Package jme3utilities.wes
Class TransformTrackBuilder
java.lang.Object
jme3utilities.wes.TransformTrackBuilder
Gather the data needed to construct a TransformTrack.
-
Constructor Summary
ConstructorsConstructorDescriptionTransformTrackBuilder(com.jme3.anim.util.HasLocalTransform target, float duration) Instantiate a builder for the specified target. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRotation(float time, com.jme3.math.Quaternion rotation) Add a rotation keyframe.voidaddScale(float time, com.jme3.math.Vector3f scale) Add a scaling keyframe.voidaddTranslation(float time, com.jme3.math.Vector3f translation) Add a translation keyframe.com.jme3.anim.TransformTrackbuild()Create a TransformTrack.voidsetTweenRotations(TweenRotations newTechnique) Alter the interpolation technique for rotations.voidsetTweenScales(TweenVectors newTechnique) Alter the interpolation technique for scales.voidsetTweenTranslations(TweenVectors newTechnique) Alter the interpolation technique for translations.
-
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
Alter the interpolation technique for rotations.- Parameters:
newTechnique- (not null, default=LoopSpline)
-
setTweenScales
Alter the interpolation technique for scales.- Parameters:
newTechnique- (not null, default=LoopFdcSpline)
-
setTweenTranslations
Alter the interpolation technique for translations.- Parameters:
newTechnique- (not null, default=LoopFdcSpline)
-