com.jme3.animation
Class Animation

java.lang.Object
  extended by com.jme3.animation.Animation
All Implemented Interfaces:
Savable, java.lang.Cloneable
Direct Known Subclasses:
BoneAnimation, SpatialAnimation

public class Animation
extends java.lang.Object
implements Savable, java.lang.Cloneable

The animation class updates the animation target with the tracks of a given type.


Constructor Summary
Animation()
          Serialization-only.
Animation(java.lang.String name, float length)
          Creates a new Animation with the given name and length.
 
Method Summary
 Animation clone()
          This method creates a clone of the current object.
 float getLength()
          Returns the length in seconds of this animation
 java.lang.String getName()
          The name of the bone animation
 Track[] getTracks()
          Returns the tracks set in setTracks(com.jme3.animation.Track[]).
 void read(JmeImporter im)
           
 void setTracks(Track[] tracks)
          Set the Tracks to be used by this animation.
 java.lang.String toString()
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Animation

public Animation()
Serialization-only. Do not use.


Animation

public Animation(java.lang.String name,
                 float length)
Creates a new Animation with the given name and length.

Parameters:
name - The name of the animation.
length - Length in seconds of the animation.
Method Detail

getName

public java.lang.String getName()
The name of the bone animation

Returns:
name of the bone animation

getLength

public float getLength()
Returns the length in seconds of this animation

Returns:
the length in seconds of this animation

setTracks

public void setTracks(Track[] tracks)
Set the Tracks to be used by this animation.

The array should be organized so that the appropriate Track can be retrieved based on a bone index.

Parameters:
tracks - The tracks to set.

getTracks

public Track[] getTracks()
Returns the tracks set in setTracks(com.jme3.animation.Track[]).

Returns:
the tracks set previously

clone

public Animation clone()
This method creates a clone of the current object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of the current object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException