public Vector3 InterpolateFast(float tf) { if (Splines.Count == 0) { return(Vector3.zero); } if (Splines.Count == 1) { return(Splines[0].InterpolateFast(tf)); } return(LerpAcross( Splines.Select(s => s.InterpolateFast(tf)), Splines.Count, Interpolant)); }
public float GetNearestPointTF(Vector3 point) { if (Splines.Count == 0) { return(0f); } if (Splines.Count == 1) { return(Splines[0].GetNearestPointTF(point)); } return(LerpAcross( Splines.Select(s => s.GetNearestPointTF(point)), Splines.Count, Interpolant)); }
public Quaternion GetOrientationFast(float tf) { if (Splines.Count == 0) { return(Quaternion.identity); } if (Splines.Count == 1) { return(Splines[0].GetOrientationFast(tf)); } return(SlerpAcross( Splines.Select(s => s.GetOrientationFast(tf)), Splines.Count, Interpolant)); }
public float DistanceToTF(float distance) { if (Splines.Count == 0) { return(0f); } if (Splines.Count == 1) { return(Splines[0].DistanceToTF(distance)); } return(LerpAcross( Splines.Select(s => s.DistanceToTF(distance)), Splines.Count, Interpolant)); }