Exemple #1
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();
        }