Enum Class TweenVectors

java.lang.Object
java.lang.Enum<TweenVectors>
jme3utilities.wes.TweenVectors
All Implemented Interfaces:
Serializable, Comparable<TweenVectors>, Constable

public enum TweenVectors extends Enum<TweenVectors>
Enumerate and implement some interpolation techniques on time sequences of Vector3f values.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    acyclic uniform Catmull-Rom cubic-spline interpolation
    acyclic centripetal Catmull-Rom cubic-spline interpolation
    acyclic finite-difference cubic-spline interpolation
    acyclic linear (Lerp) interpolation
    cyclic uniform Catmull-Rom cubic-spline interpolation
    cyclic centripetal Catmull-Rom cubic-spline interpolation
    cyclic finite-difference cubic-spline interpolation
    cyclic linear (Lerp) interpolation
  • Method Summary

    Modifier and Type
    Method
    Description
    com.jme3.math.Vector3f
    cubicSpline(float time, float[] times, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in an acyclic time sequence using cubic-spline interpolation.
    com.jme3.math.Vector3f
    interpolate(float time, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in a time sequence using this technique.
    com.jme3.math.Vector3f
    interpolate(float time, VectorCurve curve, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in a time sequence using this technique and precomputed parameters.
    static com.jme3.math.Vector3f
    lerp(float time, float[] times, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in an acyclic time sequence using linear (Lerp) interpolation.
    com.jme3.math.Vector3f
    loopCubicSpline(float time, int last, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in a cyclic time sequence using cubic-spline interpolation.
    static com.jme3.math.Vector3f
    loopLerp(float time, int last, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
    Interpolate among vectors in a cyclic time sequence using linear (Lerp) interpolation.
    precompute(float[] times, float cycleTime, com.jme3.math.Vector3f[] samples)
    Precompute a curve from vectors in a time sequence.
    Returns the enum constant of this class with the specified name.
    static TweenVectors[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CatmullRomSpline

      public static final TweenVectors CatmullRomSpline
      acyclic uniform Catmull-Rom cubic-spline interpolation
    • CentripetalSpline

      public static final TweenVectors CentripetalSpline
      acyclic centripetal Catmull-Rom cubic-spline interpolation
    • FdcSpline

      public static final TweenVectors FdcSpline
      acyclic finite-difference cubic-spline interpolation
    • Lerp

      public static final TweenVectors Lerp
      acyclic linear (Lerp) interpolation
    • LoopCatmullRomSpline

      public static final TweenVectors LoopCatmullRomSpline
      cyclic uniform Catmull-Rom cubic-spline interpolation
    • LoopCentripetalSpline

      public static final TweenVectors LoopCentripetalSpline
      cyclic centripetal Catmull-Rom cubic-spline interpolation
    • LoopFdcSpline

      public static final TweenVectors LoopFdcSpline
      cyclic finite-difference cubic-spline interpolation
    • LoopLerp

      public static final TweenVectors LoopLerp
      cyclic linear (Lerp) interpolation
  • Method Details

    • values

      public static TweenVectors[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TweenVectors valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • cubicSpline

      public com.jme3.math.Vector3f cubicSpline(float time, float[] times, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in an acyclic time sequence using cubic-spline interpolation.
      Parameters:
      time - (≥times[0])
      times - (not null, unaffected, length>0, in strictly ascending order)
      samples - function values (not null, unaffected, same length as times)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • interpolate

      public com.jme3.math.Vector3f interpolate(float time, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in a time sequence using this technique.
      Parameters:
      time - parameter value
      times - (not null, unaffected, length>0, in strictly ascending order)
      cycleTime - end time for looping (≥times[last])
      samples - function values (not null, unaffected, same length as times)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • interpolate

      public com.jme3.math.Vector3f interpolate(float time, VectorCurve curve, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in a time sequence using this technique and precomputed parameters.
      Parameters:
      time - parameter value
      curve - curve parameters (not null, unaffected)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • lerp

      public static com.jme3.math.Vector3f lerp(float time, float[] times, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in an acyclic time sequence using linear (Lerp) interpolation. This is essentially what AnimControl uses to interpolate translations and scales in bone tracks.
      Parameters:
      time - parameter value (≥times[0])
      times - (not null, unaffected, length>0, in strictly ascending order)
      samples - function values (not null, unaffected, same length as times, each not null)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • loopCubicSpline

      public com.jme3.math.Vector3f loopCubicSpline(float time, int last, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in a cyclic time sequence using cubic-spline interpolation.
      Parameters:
      time - parameter value (≥0, ≤cycleTime)
      last - (index of the last point, ≥1)
      times - (not null, unaffected, in strictly ascending order, times[0]==0)
      cycleTime - cycle time (>times[last])
      samples - function values (not null, unaffected)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • loopLerp

      public static com.jme3.math.Vector3f loopLerp(float time, int last, float[] times, float cycleTime, com.jme3.math.Vector3f[] samples, com.jme3.math.Vector3f storeResult)
      Interpolate among vectors in a cyclic time sequence using linear (Lerp) interpolation.
      Parameters:
      time - parameter value (≥0, ≤cycleTime)
      last - (index of the last point, ≥1)
      times - (not null, unaffected, in strictly ascending order, times[0]==0)
      cycleTime - cycle time (>times[last])
      samples - function values (not null, unaffected, each not null)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated vector (either storeResult or a new instance)
    • precompute

      public VectorCurve precompute(float[] times, float cycleTime, com.jme3.math.Vector3f[] samples)
      Precompute a curve from vectors in a time sequence.
      Parameters:
      times - (not null, unaffected, length>0, in strictly ascending order)
      cycleTime - end time of loop (≥times[lastIndex])
      samples - function values (not null, unaffected, same length as times, each norm==1)
      Returns:
      a new instance