Enum Class TweenRotations

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

public enum TweenRotations extends Enum<TweenRotations>
Enumerate and implement some interpolation techniques on time sequences of unit quaternions.
  • 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
    cyclic normalized linear (Nlerp) interpolation
    cyclic spherical linear (Slerp) or "great arc" interpolation using shortcuts
    cyclic spherical linear (Slerp) or "great arc" interpolation
    cyclic cubic-spline interpolation based on the Squad function
    acyclic normalized linear (Nlerp) interpolation
    acyclic spherical linear (Slerp) or "great arc" interpolation using shortcuts
    acyclic spherical linear (Slerp) or "great arc" interpolation
    acyclic cubic-spline interpolation based on the Squad function
  • Method Summary

    Modifier and Type
    Method
    Description
    com.jme3.math.Quaternion
    interpolate(float time, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in a time sequence using this technique.
    com.jme3.math.Quaternion
    interpolate(float time, RotationCurve curve, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in a time sequence using this technique and some precomputed parameters.
    com.jme3.math.Quaternion
    lerp(float time, float[] times, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in an acyclic time sequence using linear (Nlerp/Slerp) interpolation.
    com.jme3.math.Quaternion
    loopLerp(float time, int lastIndex, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in a cyclic time sequence using linear (Nlerp/Slerp) interpolation.
    static com.jme3.math.Quaternion
    loopSpline(float time, int lastIndex, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in a cyclic time sequence using cubic-spline interpolation based on the Squad function.
    precompute(float[] times, float cycleTime, com.jme3.math.Quaternion[] samples)
    Generate a rotation curve.
    static com.jme3.math.Quaternion
    spline(float time, float[] times, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
    Interpolate among unit quaternions in an acyclic time sequence using cubic-spline interpolation based on the Squad function.
    Returns the enum constant of this class with the specified name.
    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

    • LoopNlerp

      public static final TweenRotations LoopNlerp
      cyclic normalized linear (Nlerp) interpolation
    • LoopQuickSlerp

      public static final TweenRotations LoopQuickSlerp
      cyclic spherical linear (Slerp) or "great arc" interpolation using shortcuts
    • LoopSlerp

      public static final TweenRotations LoopSlerp
      cyclic spherical linear (Slerp) or "great arc" interpolation
    • LoopSpline

      public static final TweenRotations LoopSpline
      cyclic cubic-spline interpolation based on the Squad function
    • Nlerp

      public static final TweenRotations Nlerp
      acyclic normalized linear (Nlerp) interpolation
    • QuickSlerp

      public static final TweenRotations QuickSlerp
      acyclic spherical linear (Slerp) or "great arc" interpolation using shortcuts
    • Slerp

      public static final TweenRotations Slerp
      acyclic spherical linear (Slerp) or "great arc" interpolation
    • Spline

      public static final TweenRotations Spline
      acyclic cubic-spline interpolation based on the Squad function
  • Method Details

    • values

      public static TweenRotations[] 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 TweenRotations 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
    • interpolate

      public com.jme3.math.Quaternion interpolate(float time, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
      Interpolate among unit quaternions 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[lastIndex])
      samples - function values (not null, unaffected, same length as times, each norm=1)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated unit quaternion (either storeResult or a new instance)
    • interpolate

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

      public com.jme3.math.Quaternion lerp(float time, float[] times, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
      Interpolate among unit quaternions in an acyclic time sequence using linear (Nlerp/Slerp) interpolation. Nlerp is essentially what AnimControl uses to interpolate rotations 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 norm=1)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated unit quaternion (either storeResult or a new instance)
    • loopLerp

      public com.jme3.math.Quaternion loopLerp(float time, int lastIndex, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
      Interpolate among unit quaternions in a cyclic time sequence using linear (Nlerp/Slerp) interpolation.
      Parameters:
      time - parameter value (≥0, ≤cycleTime)
      lastIndex - (index of the last point to use, ≥1)
      times - (not null, unaffected, in strictly ascending order, times[0]==0)
      cycleTime - cycle time (>times[lastIndex])
      samples - function values (not null, unaffected, each norm=1)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated unit quaternion (either storeResult or a new instance)
    • loopSpline

      public static com.jme3.math.Quaternion loopSpline(float time, int lastIndex, float[] times, float cycleTime, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
      Interpolate among unit quaternions in a cyclic time sequence using cubic-spline interpolation based on the Squad function.
      Parameters:
      time - parameter value (≥0, ≤cycleTime)
      lastIndex - (index of the last point to use, ≥1)
      times - (not null, unaffected, in strictly ascending order, times[0]==0)
      cycleTime - cycle time (>times[lastIndex])
      samples - function values (not null, unaffected, each norm=1)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated unit quaternion (either storeResult or a new instance)
    • precompute

      public RotationCurve precompute(float[] times, float cycleTime, com.jme3.math.Quaternion[] samples)
      Generate a rotation curve.
      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
    • spline

      public static com.jme3.math.Quaternion spline(float time, float[] times, com.jme3.math.Quaternion[] samples, com.jme3.math.Quaternion storeResult)
      Interpolate among unit quaternions in an acyclic time sequence using cubic-spline interpolation based on the Squad function.
      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, norm=1)
      storeResult - storage for the result (modified if not null)
      Returns:
      an interpolated unit quaternion (either storeResult or a new instance)