BezierCurves.BezierCurve3D.GetNormalOnCubicCurve C# (CSharp) Method

GetNormalOnCubicCurve() public static method

public static GetNormalOnCubicCurve ( float time, Vector3 up, BezierPoint3D startPoint, BezierPoint3D endPoint ) : Vector3
time float
up UnityEngine.Vector3
startPoint BezierPoint3D
endPoint BezierPoint3D
return UnityEngine.Vector3
        public static Vector3 GetNormalOnCubicCurve(float time, Vector3 up, BezierPoint3D startPoint, BezierPoint3D endPoint)
        {
            return GetNormalOnCubicCurve(time, up, startPoint.Position, endPoint.Position, startPoint.RightHandlePosition, endPoint.LeftHandlePosition);
        }

Same methods

BezierCurve3D::GetNormalOnCubicCurve ( float time, Vector3 up, Vector3 startPosition, Vector3 endPosition, Vector3 startTangent, Vector3 endTangent ) : Vector3

Usage Example

Example #1
0
        public Vector3 GetNormal(float time, Vector3 up)
        {
            BezierPoint3D startPoint;
            BezierPoint3D endPoint;
            float         timeRelativeToSegment;

            this.GetCubicSegment(time, out startPoint, out endPoint, out timeRelativeToSegment);

            return(BezierCurve3D.GetNormalOnCubicCurve(timeRelativeToSegment, up, startPoint, endPoint));
        }