|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.scene.Controller
com.jme.animation.AnimationController
public class AnimationController
AnimationController provides a method for managing multiple BoneAnimations. AnimationController maintains a list of available animations to play, and a reference to the currently active animation. The currently active animation can be set via index into the animation set, the name of the animation or a reference to the animation itself. If blending is used, the active animation is not immediately switched, but instead morphs with an incoming animation via crossfading for a specified period of time. When the blend is complete, the active animation is set to the incoming animation.
BoneAnimation,
Serialized Form| Field Summary | |
|---|---|
protected BoneAnimation |
restPoseAnimation
|
protected int |
restPoseFrame
|
| Fields inherited from class com.jme.scene.Controller |
|---|
RT_CLAMP, RT_CYCLE, RT_WRAP |
| Constructor Summary | |
|---|---|
AnimationController()
|
|
| Method Summary | |
|---|---|
void |
addAnimation(BoneAnimation bac)
|
void |
clearActiveAnimation()
|
void |
clearAnimations()
|
BoneAnimation |
getActiveAnimation()
|
BoneAnimation |
getAnimation(int i)
|
BoneAnimation |
getAnimation(java.lang.String name)
|
java.util.ArrayList<BoneAnimation> |
getAnimations()
|
BoneAnimation |
getBlendAnimation()
|
float |
getCurTime()
|
float |
getMaxTime()
Returns the current maximum time for this controller. |
float |
getMinTime()
Returns the current minimum time of this controller |
Spatial |
getModelNode()
|
AnimationProperties |
getProps()
|
java.lang.String |
getRestPoseAnimName()
|
int |
getRestPoseFrame()
|
boolean |
hasAnimation(java.lang.String name)
|
void |
read(JMEImporter e)
|
void |
removeAnimation(BoneAnimation bac)
|
void |
removeAnimation(int index)
|
void |
reset()
Resets the active animation to the start, then disables the AnimationController so the animation will no longer animate. |
void |
rest()
This method does not activate or deactive the Controller itself, nor does it refresh any skins. |
void |
setActiveAnimation(BoneAnimation bac)
|
void |
setActiveAnimation(BoneAnimation bac,
boolean blend,
float time,
boolean sync)
|
void |
setActiveAnimation(int index)
|
void |
setActiveAnimation(int index,
boolean blend,
float time,
boolean sync)
|
void |
setActiveAnimation(java.lang.String name)
|
void |
setActiveAnimation(java.lang.String name,
boolean blend,
float time,
AnimationProperties props)
|
void |
setBlendAnimation(BoneAnimation blendAnimation,
float blendTime,
boolean sync)
|
void |
setCurrentFrame(int frame)
|
void |
setMaxTime(float minTime)
Has no effect, and that is misleading. |
void |
setMinTime(float minTime)
Has no effect, and that is misleading. |
void |
setModelNode(Spatial modelNode)
|
void |
setProps(AnimationProperties props)
|
void |
setRestPoseAnimName(java.lang.String restPoseAnimName)
|
void |
setRestPoseFrame(int restPoseFrame)
|
void |
setSkeleton(Bone b)
|
void |
update(float time)
Defined by extending classes, update is a signal to
Controller that it should update whatever object(s) it is controlling. |
void |
updateProps()
|
void |
write(JMEExporter e)
|
| Methods inherited from class com.jme.scene.Controller |
|---|
getClassTag, getControllerValues, getRepeatType, getSpeed, isActive, setActive, setControllerValues, setRepeatType, setSpeed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jme.util.export.Savable |
|---|
getClassTag |
| Field Detail |
|---|
protected int restPoseFrame
protected BoneAnimation restPoseAnimation
| Constructor Detail |
|---|
public AnimationController()
| Method Detail |
|---|
public void reset()
This method does not clear the active animation (there is a method to do that).
public void addAnimation(BoneAnimation bac)
public boolean hasAnimation(java.lang.String name)
public BoneAnimation getAnimation(java.lang.String name)
public void removeAnimation(BoneAnimation bac)
public void removeAnimation(int index)
public BoneAnimation getActiveAnimation()
public void setCurrentFrame(int frame)
public void clearAnimations()
public BoneAnimation getAnimation(int i)
public java.util.ArrayList<BoneAnimation> getAnimations()
public void clearActiveAnimation()
public void setBlendAnimation(BoneAnimation blendAnimation,
float blendTime,
boolean sync)
public void updateProps()
public void setActiveAnimation(java.lang.String name)
public void setActiveAnimation(java.lang.String name,
boolean blend,
float time,
AnimationProperties props)
public void setActiveAnimation(BoneAnimation bac)
public void setActiveAnimation(BoneAnimation bac,
boolean blend,
float time,
boolean sync)
public void setActiveAnimation(int index)
public void setActiveAnimation(int index,
boolean blend,
float time,
boolean sync)
public void setSkeleton(Bone b)
public void update(float time)
Controllerupdate is a signal to
Controller that it should update whatever object(s) it is controlling.
update in class Controllertime - The time in seconds between the last call to update and the
current one
public void write(JMEExporter e)
throws java.io.IOException
write in interface Savablewrite in class Controllerjava.io.IOException
public void read(JMEImporter e)
throws java.io.IOException
read in interface Savableread in class Controllerjava.io.IOExceptionpublic void rest()
java.lang.IllegalStateException - if either the rest pose animation or
frame have not been set.public void setRestPoseAnimName(java.lang.String restPoseAnimName)
public java.lang.String getRestPoseAnimName()
public int getRestPoseFrame()
public void setRestPoseFrame(int restPoseFrame)
public BoneAnimation getBlendAnimation()
public Spatial getModelNode()
public void setModelNode(Spatial modelNode)
public AnimationProperties getProps()
public void setProps(AnimationProperties props)
public void setMaxTime(float minTime)
setMaxTime in class ControllerminTime - The new maximum timepublic void setMinTime(float minTime)
setMinTime in class ControllerminTime - The new minimum time.public float getMinTime()
Controller
getMinTime in class Controllerpublic float getMaxTime()
Controller
getMaxTime in class Controllerpublic float getCurTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||