AnimComposer@Deprecated public final class AnimControl extends AbstractControl implements java.lang.Cloneable, JmeCloneable
AnimControl is a Spatial control that allows manipulation
of skeletal animation.
The control currently supports:
1) Animation blending/transitions
2) Multiple animation channels
3) Multiple skins
4) Animation event listeners
5) Animated model cloning
6) Animated model binary import/export
7) Hardware skinning
8) Attachments
9) Add/remove skins
Planned:
1) Morph/Pose animationenabled, spatial| Constructor and Description |
|---|
AnimControl()
Deprecated.
Instantiate an animation control with no skeleton, suitable only for
animations that don't contain any bone tracks.
|
AnimControl(Skeleton skeleton)
Deprecated.
Creates a new animation control for the given skeleton.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnim(Animation anim)
Deprecated.
Adds an animation to be available for playing to this
AnimControl. |
void |
addListener(AnimEventListener listener)
Deprecated.
Adds a new listener to receive animation related events.
|
void |
clearChannels()
Deprecated.
Clears all the channels that were created.
|
void |
clearListeners()
Deprecated.
Clears all the listeners added to this
AnimControl |
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Deprecated.
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
Deprecated.
Internal use only.
|
protected void |
controlUpdate(float tpf)
Deprecated.
Internal use only.
|
AnimChannel |
createChannel()
Deprecated.
Create a new animation channel, by default assigned to all bones
in the skeleton.
|
Animation |
getAnim(java.lang.String name)
Deprecated.
Retrieve an animation from the list of animations.
|
float |
getAnimationLength(java.lang.String name)
Deprecated.
Returns the length of the given named animation.
|
java.util.Collection<java.lang.String> |
getAnimationNames()
Deprecated.
|
AnimChannel |
getChannel(int index)
Deprecated.
Return the animation channel at the given index.
|
int |
getNumChannels()
Deprecated.
|
Skeleton |
getSkeleton()
Deprecated.
|
java.lang.Object |
jmeClone()
Deprecated.
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im)
Deprecated.
|
void |
removeAnim(Animation anim)
Deprecated.
Remove an animation so that it is no longer available for playing.
|
void |
removeListener(AnimEventListener listener)
Deprecated.
Removes the given listener from listening to events.
|
void |
setAnimations(java.util.HashMap<java.lang.String,Animation> animations)
Deprecated.
|
void |
setSpatial(Spatial spatial)
Deprecated.
Internal use only.
|
void |
write(JmeExporter ex)
Deprecated.
|
cloneForSpatial, getSpatial, isEnabled, render, setEnabled, updatepublic AnimControl(Skeleton skeleton)
setAnimations(java.util.HashMap)
must be called after initialization in order for this class to be useful.skeleton - The skeleton to animatepublic AnimControl()
public java.lang.Object jmeClone()
JmeCloneableThis method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in.
jmeClone in interface JmeCloneablejmeClone in class AbstractControlpublic void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneableNote: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields in interface JmeCloneablecloneFields in class AbstractControlcloner - The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original - The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone and this object need merely clone what it wants.public void setAnimations(java.util.HashMap<java.lang.String,Animation> animations)
animations - Set the animations that this AnimControl
will be capable of playing. The animations should be compatible
with the skeleton given in the constructor.public Animation getAnim(java.lang.String name)
name - The name of the animation to retrieve.public void addAnim(Animation anim)
AnimControl.anim - The animation to add.public void removeAnim(Animation anim)
anim - The animation to remove.public AnimChannel createChannel()
AnimControl.public AnimChannel getChannel(int index)
index - The index, starting at 0, to retrieve the AnimChannel.java.lang.IndexOutOfBoundsException - If no channel exists at the given index.public int getNumChannels()
AnimControl.createChannel()public void clearChannels()
createChannel()public Skeleton getSkeleton()
AnimControl.public void addListener(AnimEventListener listener)
listener - The listener to add.public void removeListener(AnimEventListener listener)
listener - addListener(com.jme3.animation.AnimEventListener)public void clearListeners()
AnimControlpublic void setSpatial(Spatial spatial)
setSpatial in interface ControlsetSpatial in class AbstractControlspatial - the spatial to be controlled. This should not be called
from user code.public java.util.Collection<java.lang.String> getAnimationNames()
AnimControl
can play.public float getAnimationLength(java.lang.String name)
name - The name of the animationprotected void controlUpdate(float tpf)
controlUpdate in class AbstractControlprotected void controlRender(RenderManager rm, ViewPort vp)
controlRender in class AbstractControlpublic void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class AbstractControljava.io.IOExceptionpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class AbstractControljava.io.IOException