Esempio n. 1
0
 protected void SetValues(int splineOrder, IEnumerable <CgmPoint> points, IEnumerable <double> knots, double start, double end)
 {
     SplineOrder = splineOrder;
     Points.AddRange(points);
     Knots.AddRange(knots);
     StartValue = start;
     EndValue   = end;
 }
Esempio n. 2
0
        public MarkGeometrySpline(
            int flag,
            int degree,
            List <double> knotsIn,
            List <MarkGeometryPoint> controlPointsIn,
            List <MarkGeometryPoint> fitPointsIn
            )
        {
            Degree     = degree;
            IsClosed   = (flag == 1);
            IsPeriodic = (flag == 2);
            Knots.AddRange(knotsIn);
            ControlPoints.AddRange(controlPointsIn);
            FitPoints.AddRange(fitPointsIn);

            // generate points
            Points.AddRange(ApproximatePoints(3 * ControlPoints.Count));
            Update();
        }