@Deprecated
public final class AnimChannel
extends java.lang.Object
AnimChannel
provides controls, such as play, pause,
fast forward, etc, for an animation. The animation
channel may influence the entire model or specific bones of the model's
skeleton. A single model may have multiple animation channels influencing
various parts of its body. For example, a character model may have an
animation channel for its feet, and another for its torso, and
the animations for each channel are controlled independently.Constructor and Description |
---|
AnimChannel()
Deprecated.
|
AnimChannel(AnimControl control)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllBones()
Deprecated.
Add all the bones of the model's skeleton to be
influenced by this animation channel.
|
void |
addBone(Bone bone)
Deprecated.
Add a single bone to be influenced by this animation channel.
|
void |
addBone(java.lang.String name)
Deprecated.
Add a single bone to be influenced by this animation channel.
|
void |
addFromRootBone(Bone bone)
Deprecated.
Add bones to be influenced by this animation channel, starting
from the given bone and going toward its children.
|
void |
addFromRootBone(java.lang.String name)
Deprecated.
Add bones to be influenced by this animation channel, starting
from the given named bone and going toward its children.
|
void |
addToRootBone(Bone bone)
Deprecated.
Add bones to be influenced by this animation channel starting from the
given bone and going toward the root bone.
|
void |
addToRootBone(java.lang.String name)
Deprecated.
Add bones to be influenced by this animation channel starting from the
given bone name and going toward the root bone.
|
java.lang.String |
getAnimationName()
Deprecated.
|
float |
getAnimMaxTime()
Deprecated.
|
AnimControl |
getControl()
Deprecated.
Returns the parent control of this AnimChannel.
|
LoopMode |
getLoopMode()
Deprecated.
|
float |
getSpeed()
Deprecated.
|
float |
getTime()
Deprecated.
|
void |
reset(boolean rewind)
Deprecated.
|
void |
setAnim(java.lang.String name)
Deprecated.
Set the current animation that is played by this AnimChannel.
|
void |
setAnim(java.lang.String name,
float blendTime)
Deprecated.
Set the current animation that is played by this AnimChannel.
|
void |
setLoopMode(LoopMode loopMode)
Deprecated.
|
void |
setSpeed(float speed)
Deprecated.
|
void |
setTime(float time)
Deprecated.
|
public AnimChannel()
public AnimChannel(AnimControl control)
public AnimControl getControl()
AnimControl
public java.lang.String getAnimationName()
setAnim(java.lang.String)
public LoopMode getLoopMode()
LoopMode
,
setLoopMode(com.jme3.animation.LoopMode)
public void setLoopMode(LoopMode loopMode)
loopMode
- Set the loop mode for the channel. The loop mode
determines what will happen to the animation once it finishes
playing.
For more information, see the LoopMode enum class.LoopMode
public float getSpeed()
setSpeed(float)
public void setSpeed(float speed)
speed
- Set the speed of the animation channel. The speed
is a scale value starting from 0.0, at 1.0 the animation will play
at its default speed.public float getTime()
setTime(float)
public void setTime(float time)
time
- Set the time of the currently playing animation, the time
is clamped from 0 to getAnimMaxTime()
.public float getAnimMaxTime()
getTime()
public void setAnim(java.lang.String name, float blendTime)
This resets the time to zero, and optionally blends the animation
over blendTime
seconds with the currently playing animation.
Notice that this method will reset the control's speed to 1.0.
name
- The name of the animation to playblendTime
- The blend time over which to blend the new animation
with the old one. If zero, then no blending will occur and the new
animation will be applied instantly.public void setAnim(java.lang.String name)
See setAnim(java.lang.String, float)
.
The blendTime argument by default is 150 milliseconds.
name
- The name of the animation to playpublic void addAllBones()
public void addBone(java.lang.String name)
public void addBone(Bone bone)
public void addToRootBone(java.lang.String name)
public void addToRootBone(Bone bone)
public void addFromRootBone(java.lang.String name)
public void addFromRootBone(Bone bone)
public void reset(boolean rewind)