Interface Spline

All Known Implementing Classes:
CatmullRomSpline

public interface Spline
Spline interface allows an interpolated vector to be calculated along a path.
See Also:
  • Method Details

    • interpolate

      Vector3 interpolate(ReadOnlyVector3 p0, ReadOnlyVector3 p1, ReadOnlyVector3 p2, ReadOnlyVector3 p3, double t)
      Will return an interpolated vector between parameters p1 and p2 using t.
      Parameters:
      p0 - The starting control point.
      p1 - The second control point.
      p2 - The third control point.
      p3 - The final control point.
      t - Should be between zero and one. Zero will return point p1 while one will return p2, a value in between will return an interpolated vector between the two.
      Returns:
      The interpolated vector.
    • interpolate

      Vector3 interpolate(ReadOnlyVector3 p0, ReadOnlyVector3 p1, ReadOnlyVector3 p2, ReadOnlyVector3 p3, double t, Vector3 result)
      Will return an interpolated vector between parameters p1 and p2 using t.
      Parameters:
      p0 - The starting control point.
      p1 - The second control point.
      p2 - The third control point.
      p3 - The final control point.
      t - Should be between zero and one. Zero will return point p1 while one will return p2, a value in between will return an interpolated vector between the two.
      result - The interpolated values will be added to this vector.
      Returns:
      The result vector passed in.