Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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));
 }