Class TransformTrackBuilder

java.lang.Object
jme3utilities.wes.TransformTrackBuilder

public class TransformTrackBuilder extends Object
Gather the data needed to construct a TransformTrack.
  • Constructor Details

    • TransformTrackBuilder

      public TransformTrackBuilder(com.jme3.anim.util.HasLocalTransform target, float duration)
      Instantiate a builder for the specified target.
      Parameters:
      target - the animation target, typically an animation joint or a Spatial (not null)
      duration - the expected duration of the animation clip (in seconds, ≥0)
  • Method Details

    • addRotation

      public void addRotation(float time, com.jme3.math.Quaternion rotation)
      Add a rotation keyframe.
      Parameters:
      time - the animation time (in seconds, ≥0, ≤duration)
      rotation - the desired rotation at that time (not null, unaffected)
    • addScale

      public void addScale(float time, com.jme3.math.Vector3f scale)
      Add a scaling keyframe.
      Parameters:
      time - the animation time (in seconds, ≥0, ≤duration)
      scale - the desired scale factors at that time (not null, unaffected)
    • addTranslation

      public void addTranslation(float time, com.jme3.math.Vector3f translation)
      Add a translation keyframe.
      Parameters:
      time - the animation time (in seconds, ≥0, ≤duration)
      translation - the desired translation at that time (not null, unaffected)
    • build

      public com.jme3.anim.TransformTrack build()
      Create a TransformTrack.
      Returns:
      a new instance (not null)
    • setTweenRotations

      public void setTweenRotations(TweenRotations newTechnique)
      Alter the interpolation technique for rotations.
      Parameters:
      newTechnique - (not null, default=LoopSpline)
    • setTweenScales

      public void setTweenScales(TweenVectors newTechnique)
      Alter the interpolation technique for scales.
      Parameters:
      newTechnique - (not null, default=LoopFdcSpline)
    • setTweenTranslations

      public void setTweenTranslations(TweenVectors newTechnique)
      Alter the interpolation technique for translations.
      Parameters:
      newTechnique - (not null, default=LoopFdcSpline)