|
||||||||||
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. The
BoneAnimation
,
Serialized FormField Summary |
---|
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()
|
boolean |
hasAnimation(java.lang.String name)
|
void |
read(JMEImporter e)
|
void |
removeAnimation(BoneAnimation bac)
|
void |
removeAnimation(int index)
|
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 |
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 |
Constructor Detail |
---|
public AnimationController()
Method Detail |
---|
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)
Controller
update
is a signal to
Controller that it should update whatever object(s) it is controlling.
update
in class Controller
time
- The time in seconds between the last call to update and the
current onepublic void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class Controller
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class Controller
java.io.IOException
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 Controller
minTime
- The new maximum timepublic void setMinTime(float minTime)
setMinTime
in class Controller
minTime
- The new minimum time.public float getMinTime()
Controller
getMinTime
in class Controller
public float getMaxTime()
Controller
getMaxTime
in class Controller
public float getCurTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |