public static float GetApproximateLengthOfCubicCurve(BezierPoint3D startPoint, BezierPoint3D endPoint, int sampling) { return GetApproximateLengthOfCubicCurve(startPoint.Position, endPoint.Position, startPoint.RightHandlePosition, endPoint.LeftHandlePosition, sampling); }
public float GetApproximateLength() { float length = 0; int subCurveSampling = (this.Sampling / (this.KeyPointsCount - 1)) + 1; for (int i = 0; i < this.KeyPointsCount - 1; i++) { length += BezierCurve3D.GetApproximateLengthOfCubicCurve(this.KeyPoints[i], this.KeyPoints[i + 1], subCurveSampling); } return(length); }