espresso3d.engine.world.sector.actor.skeleton.animation
Class E3DAnimationKeyFrame

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.world.sector.actor.skeleton.animation.E3DAnimationKeyFrame

public class E3DAnimationKeyFrame
extends E3DEngineItem

Author:
Curt TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
E3DAnimationKeyFrame(E3DAnimationKeyFrame toCopyAnimationKeyFrame)
           
E3DAnimationKeyFrame(E3DEngine engine, java.lang.String keyFrameID, double frameLength)
          Create a keyframe named keyFrameID and have the frame last frameLength seconds
 
Method Summary
 void addAnimationCommand(E3DAnimationCommand command)
          A command is a single action that will happen during the keyframe.
 java.util.ArrayList getCommands()
           
 double getElapsedTime()
           
 double getFrameLength()
           
 java.lang.String getKeyFrameID()
           
 void removeAnimationCommand(E3DAnimationCommand command)
          Remove a command from the frame
 void reset()
          Resets the elapsed time timer of the frame
 boolean update(double lastFrameTimeSeconds)
          Returns true if it updates and hasn't yet expired Returns false if it is expired (and finished animating) and the next frame should be called
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

E3DAnimationKeyFrame

public E3DAnimationKeyFrame(E3DEngine engine,
                            java.lang.String keyFrameID,
                            double frameLength)
Create a keyframe named keyFrameID and have the frame last frameLength seconds

Parameters:
engine -
keyFrameID - ID of the keyframe
frameLength - Length of time the frame should take to complete (Seconds)

E3DAnimationKeyFrame

public E3DAnimationKeyFrame(E3DAnimationKeyFrame toCopyAnimationKeyFrame)
Method Detail

addAnimationCommand

public void addAnimationCommand(E3DAnimationCommand command)
A command is a single action that will happen during the keyframe. Commands can be things like translate a bone or rotate a bone. The command will take frameLength seconds to fully complete (it will be interpolated over the frame)

Parameters:
command -

removeAnimationCommand

public void removeAnimationCommand(E3DAnimationCommand command)
Remove a command from the frame

Parameters:
command -

reset

public void reset()
Resets the elapsed time timer of the frame


getKeyFrameID

public java.lang.String getKeyFrameID()

update

public boolean update(double lastFrameTimeSeconds)
Returns true if it updates and hasn't yet expired Returns false if it is expired (and finished animating) and the next frame should be called

Parameters:
lastFrameTimeSeconds -
Returns:

getCommands

public java.util.ArrayList getCommands()

getElapsedTime

public double getElapsedTime()

getFrameLength

public double getFrameLength()