示例#1
0
            protected static void FillIn(BGCurveBaseMath.SectionInfo section, Vector3[] result, ref int cursor, int parts)
            {
                var onePartDistance = section.Distance / parts;

                for (var j = 1; j <= parts; j++)
                {
                    Vector3 tangent;
                    section.CalcByDistance(onePartDistance * j, out result[cursor++], out tangent, true, false);
                }
            }
示例#2
0
            // add points for a section by a given number of points
            protected static void FillIn(BGCurveBaseMath.SectionInfo section, List <Vector3> result, int parts)
            {
                var onePartDistance = section.Distance / parts;

                for (var j = 1; j <= parts; j++)
                {
                    Vector3 tangent;
                    Vector3 pos;
                    section.CalcByDistance(onePartDistance * j, out pos, out tangent, true, false);
                    result.Add(pos);
                }
            }
            // add points for a section by a given number of points
            protected void FillIn(BGCurveBaseMath.SectionInfo section, List <Vector3> result, int parts, List <BGCcSplitterPolyline.PolylinePoint> points)
            {
                var onePartDistance = section.Distance / parts;

                for (var j = 1; j <= parts; j++)
                {
                    Vector3 tangent;
                    Vector3 pos;
                    var     currentDistance = onePartDistance * j;
                    section.CalcByDistance(currentDistance, out pos, out tangent, true, calculatingTangents);
                    result.Add(pos);
                    points.Add(new BGCcSplitterPolyline.PolylinePoint(pos, section.DistanceFromStartToOrigin + currentDistance, tangent));
                }
            }