public class AnimComposer extends AbstractControl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_LAYER |
enabled, spatial
Constructor and Description |
---|
AnimComposer() |
Modifier and Type | Method and Description |
---|---|
Action |
action(java.lang.String name) |
BlendAction |
actionBlended(java.lang.String name,
BlendSpace blendSpace,
java.lang.String... clips) |
BaseAction |
actionSequence(java.lang.String name,
Tween... tweens) |
void |
addAction(java.lang.String name,
Action action)
Register given action with specified name.
|
void |
addAnimClip(AnimClip anim)
Adds an animation to be available for playing to this
AnimControl . |
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
To be implemented in subclass.
|
protected void |
controlUpdate(float tpf)
To be implemented in subclass.
|
Action |
getAction(java.lang.String name) |
AnimClip |
getAnimClip(java.lang.String name)
Retrieve an animation from the list of animations.
|
java.util.Collection<AnimClip> |
getAnimClips()
Returns an unmodifiable collection of all available animations.
|
java.util.Set<java.lang.String> |
getAnimClipsNames()
Returns an unmodifiable set of all available animation names.
|
float |
getGlobalSpeed() |
double |
getTime(java.lang.String layerName)
Returns current time of the specified layer.
|
boolean |
hasAction(java.lang.String name) |
boolean |
hasAnimClip(java.lang.String name) |
java.lang.Object |
jmeClone()
Performs a regular shallow clone of the object.
|
Action |
makeAction(java.lang.String name)
Create a new ClipAction with specified clip name.
|
void |
makeLayer(java.lang.String name,
AnimationMask mask) |
void |
read(JmeImporter im) |
Action |
removeAction(java.lang.String name)
Remove specified action.
|
void |
removeAnimClip(AnimClip anim)
Remove an animation so that it is no longer available for playing.
|
void |
removeCurrentAction(java.lang.String layerName)
Remove current action on specified layer.
|
void |
removeLayer(java.lang.String name)
Remove specified layer.
|
void |
reset() |
Action |
setCurrentAction(java.lang.String name) |
Action |
setCurrentAction(java.lang.String actionName,
java.lang.String layerName)
Run an action on specified layer.
|
void |
setGlobalSpeed(float globalSpeed) |
void |
setTime(java.lang.String layerName,
double time)
Sets current time on the specified layer.
|
void |
write(JmeExporter ex) |
cloneForSpatial, getSpatial, isEnabled, render, setEnabled, setSpatial, update
public static final java.lang.String DEFAULT_LAYER
public boolean hasAnimClip(java.lang.String name)
public AnimClip getAnimClip(java.lang.String name)
name
- The name of the animation to retrieve.public void addAnimClip(AnimClip anim)
AnimControl
.anim
- The animation to add.public void removeAnimClip(AnimClip anim)
anim
- The animation to remove.public Action setCurrentAction(java.lang.String name)
public Action setCurrentAction(java.lang.String actionName, java.lang.String layerName)
actionName
- The name of the action to run.layerName
- The layer on which action should run.public void removeCurrentAction(java.lang.String layerName)
layerName
- The name of the layer we want to remove its action.public double getTime(java.lang.String layerName)
public void setTime(java.lang.String layerName, double time)
public Action action(java.lang.String name)
name
- The name of the action to return.makeAction(java.lang.String)
public Action getAction(java.lang.String name)
name
- The name of the action to return.public void addAction(java.lang.String name, Action action)
name
- The name of the action.action
- The action to add.public Action makeAction(java.lang.String name)
name
- The name of the clip.java.lang.IllegalArgumentException
- if clip with specified name not found.public boolean hasAction(java.lang.String name)
public Action removeAction(java.lang.String name)
name
- The name of the action to remove.public void makeLayer(java.lang.String name, AnimationMask mask)
public void removeLayer(java.lang.String name)
name
- The name of the layer to remove.public BaseAction actionSequence(java.lang.String name, Tween... tweens)
public BlendAction actionBlended(java.lang.String name, BlendSpace blendSpace, java.lang.String... clips)
public void reset()
public java.util.Collection<AnimClip> getAnimClips()
public java.util.Set<java.lang.String> getAnimClipsNames()
protected void controlUpdate(float tpf)
AbstractControl
controlUpdate
in class AbstractControl
protected void controlRender(RenderManager rm, ViewPort vp)
AbstractControl
controlRender
in class AbstractControl
public float getGlobalSpeed()
public void setGlobalSpeed(float globalSpeed)
public java.lang.Object jmeClone()
JmeCloneable
This 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 JmeCloneable
jmeClone
in class AbstractControl
public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: 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 JmeCloneable
cloneFields
in class AbstractControl
cloner
- 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 read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class AbstractControl
java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class AbstractControl
java.io.IOException