Bezier.Bezier.Bezier C# (CSharp) Метод

Bezier() публичный Метод

public Bezier ( Vector3 a, Vector3 b, Vector3 c, Vector3 d, float precision, Quaternion startRot_, Quaternion endRot_ ) : System.Collections
a UnityEngine.Vector3
b UnityEngine.Vector3
c UnityEngine.Vector3
d UnityEngine.Vector3
precision float
startRot_ UnityEngine.Quaternion
endRot_ UnityEngine.Quaternion
Результат System.Collections
        public Bezier(Vector3 a, Vector3 b, Vector3 c, Vector3 d, float precision, Quaternion startRot_, Quaternion endRot_)
        {
            this.a = a;
            aa = (-a + 3*(b-c) + d);
            bb = 3*(a+c) - 6*b;
            cc = 3*(b-a);

            this.len = 1.0f / precision;
            arcLengths = new float[(int)this.len + (int)1];
            arcLengths[0] = 0;

            Vector3 ov = a;
            Vector3 v;
            float clen = 0.0f;
            for(int i = 1; i <= this.len; i++) {
                v = bezierPoint(i * precision);
                clen += (ov - v).magnitude;
                this.arcLengths[i] = clen;
                ov = v;
            }
            this.length = clen;

            //
            this.startRot = startRot_;
            this.endRot = endRot_;
        }