com.jmex.model.animation
Class PointInTime

java.lang.Object
  extended by com.jmex.model.animation.PointInTime
All Implemented Interfaces:
Savable

public class PointInTime
extends java.lang.Object
implements Savable

At a point in time is defined by time . JointController will change joint i to the rotation jointRotation[i] and translation jointTranslation[i] at the point in time time


Field Summary
 Quaternion[] jointRotation
          Array of rotations for this PointInTime.
 Vector3f[] jointTranslation
          Array of translations for this PointInTime.
 float time
          The time represented by this PointInTime.
 java.util.BitSet usedRot
          The bitsets specify if the translation/rotation was specified externally, or if it was interpolated.
 java.util.BitSet usedTrans
          The bitsets specify if the translation/rotation was specified externally, or if it was interpolated.
 
Constructor Summary
PointInTime()
           
PointInTime(int numJoints)
          Creates a new PointInTime with everything false or null to start with.
PointInTime(int numJoints, int time)
          Constructs a new PointInTime at the given time.
 
Method Summary
 java.lang.Class getClassTag()
           
 void read(JMEImporter e)
           
(package private)  void setRotation(int jointIndex, float x, float y, float z)
           
 void setRotation(int jointIndex, Quaternion quaternion)
          Sets for the given joint to have the given rotation.
(package private)  void setTranslation(int jointIndex, float x, float y, float z)
           
(package private)  void setTranslation(int jointIndex, Vector3f v)
           
 void write(JMEExporter e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

public float time
The time represented by this PointInTime.


jointTranslation

public Vector3f[] jointTranslation
Array of translations for this PointInTime. Each value represents a translation.


jointRotation

public Quaternion[] jointRotation
Array of rotations for this PointInTime. Each value represents a joint.


usedTrans

public java.util.BitSet usedTrans
The bitsets specify if the translation/rotation was specified externally, or if it was interpolated. This is useful to cut down on stored file size.


usedRot

public java.util.BitSet usedRot
The bitsets specify if the translation/rotation was specified externally, or if it was interpolated. This is useful to cut down on stored file size.

Constructor Detail

PointInTime

public PointInTime()

PointInTime

public PointInTime(int numJoints)
Creates a new PointInTime with everything false or null to start with.


PointInTime

public PointInTime(int numJoints,
                   int time)
Constructs a new PointInTime at the given time.

Parameters:
time - The time for the new PointInTime.
controller - TODO
Method Detail

setRotation

void setRotation(int jointIndex,
                 float x,
                 float y,
                 float z)

setTranslation

void setTranslation(int jointIndex,
                    float x,
                    float y,
                    float z)

setTranslation

void setTranslation(int jointIndex,
                    Vector3f v)

setRotation

public void setRotation(int jointIndex,
                        Quaternion quaternion)
Sets for the given joint to have the given rotation.

Parameters:
jointIndex - The joint index.
quaternion - The rotation for this point in time.

write

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

read

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

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable