コード例 #1
0
 public Bezier(int N_)
 {
     N                      = N_;
     mControlVec2s          = new List <Vec2>(N + 1);
     binomialCoefficients   = new BinomialCoefficients(N);
     polynomialCoefficients = new PolynomialCoefficients(N);
 }
コード例 #2
0
 public Bezier(Bezier other)
 {
     N = other.N;
     binomialCoefficients   = new BinomialCoefficients(N);
     polynomialCoefficients = new PolynomialCoefficients(N);
     mControlVec2s          = new List <Vec2>(N + 1);
     for (int i = 0; i < other.mControlVec2s.Count; i++)
     {
         mControlVec2s.Add(new Vec2(other[i]));
     }
 }
コード例 #3
0
        public Bezier(List <Vec2> controlVec2s)
        {
            N = controlVec2s.Count - 1;
            binomialCoefficients   = new BinomialCoefficients(N);
            polynomialCoefficients = new PolynomialCoefficients(N);
            mControlVec2s          = new List <Vec2>(N + 1);

            for (int i = 0; i < controlVec2s.Count; i++)
            {
                mControlVec2s.Add(new Vec2(controlVec2s[i]));
            }
        }