com.threerings.opengl.model.tools
Class AnimationDef

java.lang.Object
  extended by com.threerings.opengl.model.tools.AnimationDef

public class AnimationDef
extends Object

An intermediate representation for animations used to store data parsed from XML.


Nested Class Summary
static class AnimationDef.FrameDef
          A single frame of the animation.
static class AnimationDef.TransformDef
          A transform for a single node.
 
Field Summary
 float frameRate
          The rate of the animation in frames per second.
 ArrayList<AnimationDef.FrameDef> frames
          The individual frames of the animation.
 
Constructor Summary
AnimationDef()
           
 
Method Summary
 void addFrame(AnimationDef.FrameDef frame)
          Called by the parser to add a frame to this animation.
 String[] getTargets()
          Returns the names of all of the animation targets.
 Transform3D[][] getTransforms(String[] targets, float scale, boolean omitLastFrame)
          Returns the transforms for each target, each frame.
 void update(AnimationConfig.Imported config)
          Updates the supplied configuration with the animation data in this definition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameRate

public float frameRate
The rate of the animation in frames per second.


frames

public ArrayList<AnimationDef.FrameDef> frames
The individual frames of the animation.

Constructor Detail

AnimationDef

public AnimationDef()
Method Detail

addFrame

public void addFrame(AnimationDef.FrameDef frame)
Called by the parser to add a frame to this animation.


update

public void update(AnimationConfig.Imported config)
Updates the supplied configuration with the animation data in this definition.


getTargets

public String[] getTargets()
Returns the names of all of the animation targets.


getTransforms

public Transform3D[][] getTransforms(String[] targets,
                                     float scale,
                                     boolean omitLastFrame)
Returns the transforms for each target, each frame.



Copyright © 2011. All Rights Reserved.