com.model.md5.controller
Class MD5Controller

java.lang.Object
  extended by com.jme.scene.Controller
      extended by com.model.md5.controller.MD5Controller
All Implemented Interfaces:
com.jme.util.export.Savable, IMD5Controller, java.io.Serializable

public class MD5Controller
extends com.jme.scene.Controller
implements IMD5Controller

MD5Controller defines the concrete implementation of a MD5 controller unit.

MD5Controller interpolates the previous and next frame then updates the skeleton with interpolated translation and orientation values.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.Controller
RT_CLAMP, RT_CYCLE, RT_WRAP
 
Constructor Summary
MD5Controller()
          Constructor of MD5Controller.
MD5Controller(IMD5Node node)
          Constructor of MD5Controller.
 
Method Summary
 void addAnimation(IMD5Animation animation)
          Add a new animation to this controller.
 void fadeTo(IMD5Animation animation, float duration, boolean scale)
          Fade from the current active animation to the given animation.
 void fadeTo(java.lang.String name, float duration, boolean scale)
          Fade from the current active animation to the given animation.
 IMD5Animation getActiveAnimation()
          Retrieve the current active animation.
 java.util.Collection<IMD5Animation> getAnimations()
          Retrieve all the maintained animations.
 java.lang.Class getClassTag()
           
 void read(com.jme.util.export.JMEImporter e)
           
 void removeAnimation(IMD5Animation animation)
          Remove the given animation.
 void update(float time)
          Update the controller.
 void write(com.jme.util.export.JMEExporter e)
           
 
Methods inherited from class com.jme.scene.Controller
getControllerValues, getMaxTime, getMinTime, getRepeatType, getSpeed, isActive, setActive, setControllerValues, setMaxTime, setMinTime, 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.model.md5.interfaces.IMD5Controller
getRepeatType, setActive, setRepeatType, setSpeed
 

Constructor Detail

MD5Controller

public MD5Controller()
Constructor of MD5Controller.


MD5Controller

public MD5Controller(IMD5Node node)
Constructor of MD5Controller.

Parameters:
node - The IMD5Node to be controlled.
Method Detail

update

public void update(float time)
Description copied from interface: IMD5Controller
Update the controller.

Specified by:
update in interface IMD5Controller
Specified by:
update in class com.jme.scene.Controller
Parameters:
time - The Float frame interpolation.

addAnimation

public void addAnimation(IMD5Animation animation)
Description copied from interface: IMD5Controller
Add a new animation to this controller. The new animation set it to be the active animation if currently there is no active animation.

Specified by:
addAnimation in interface IMD5Controller
Parameters:
animation - The IMD5Animation to be added.

removeAnimation

public void removeAnimation(IMD5Animation animation)
Description copied from interface: IMD5Controller
Remove the given animation.

Specified by:
removeAnimation in interface IMD5Controller
Parameters:
animation - The IMD5Animation to be removed.

fadeTo

public void fadeTo(java.lang.String name,
                   float duration,
                   boolean scale)
Description copied from interface: IMD5Controller
Fade from the current active animation to the given animation.

Specified by:
fadeTo in interface IMD5Controller
Parameters:
name - The name of theIMD5Animation to be faded into.
duration - The Float fading duration in seconds.
scale - True if fading duration should scale with controller speed.

fadeTo

public void fadeTo(IMD5Animation animation,
                   float duration,
                   boolean scale)
Description copied from interface: IMD5Controller
Fade from the current active animation to the given animation.

Specified by:
fadeTo in interface IMD5Controller
Parameters:
animation - The IMD5Animation to be faded into.
duration - The Float fading duration in seconds.
scale - True if fading duration should scale with controller speed.

getActiveAnimation

public IMD5Animation getActiveAnimation()
Description copied from interface: IMD5Controller
Retrieve the current active animation.

Specified by:
getActiveAnimation in interface IMD5Controller
Returns:
The active IMD5Animation.

getAnimations

public java.util.Collection<IMD5Animation> getAnimations()
Description copied from interface: IMD5Controller
Retrieve all the maintained animations.

Specified by:
getAnimations in interface IMD5Controller
Returns:
The Collection of IMD5Animation.

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface com.jme.util.export.Savable
Overrides:
getClassTag in class com.jme.scene.Controller

write

public void write(com.jme.util.export.JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface com.jme.util.export.Savable
Overrides:
write in class com.jme.scene.Controller
Throws:
java.io.IOException

read

public void read(com.jme.util.export.JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface com.jme.util.export.Savable
Overrides:
read in class com.jme.scene.Controller
Throws:
java.io.IOException