unc.cdva.graphics.animations
Class KeyFrame

java.lang.Object
  extended by unc.cdva.graphics.animations.KeyFrame

public class KeyFrame
extends java.lang.Object

Represents a 'keyframe' in an animation. A bean object, and is used to store data associated with a key frame. Animation are interpolated linearly between the keyframes.

Author:
Guillaume Conte

Constructor Summary
KeyFrame(int keyFrameId, long time, javax.vecmath.Vector3f translation, javax.vecmath.Vector4f rotation, javax.vecmath.Vector3f scale)
          Keyframe constructor - inits a keyframe with the value usually parsed in the graphics xml file
 
Method Summary
 KeyFrame clone()
          Returns a cloned keyframe object.
 int getKeyFrameId()
           
 javax.vecmath.Vector4f getRotation()
           
 javax.vecmath.Vector3f getScale()
           
 long getTime()
           
 javax.vecmath.Vector3f getTranslation()
           
 void setKeyFrameId(int keyFrameId)
           
 void setRotation(javax.vecmath.Vector4f rotation)
           
 void setScale(javax.vecmath.Vector3f scale)
           
 void setTime(long time)
           
 void setTranslation(javax.vecmath.Vector3f translation)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyFrame

public KeyFrame(int keyFrameId,
                long time,
                javax.vecmath.Vector3f translation,
                javax.vecmath.Vector4f rotation,
                javax.vecmath.Vector3f scale)
Keyframe constructor - inits a keyframe with the value usually parsed in the graphics xml file

Parameters:
keyFrameId - id of the key frame
time - time index of the key frane
translation -
rotation -
scale -
Method Detail

clone

public KeyFrame clone()
Returns a cloned keyframe object. The cloned keyframe object will have the same data as the source keyframe.

Overrides:
clone in class java.lang.Object

getKeyFrameId

public int getKeyFrameId()
Returns:
Returns the keyFrameId.

getRotation

public javax.vecmath.Vector4f getRotation()
Returns:
Returns the rotation.

getScale

public javax.vecmath.Vector3f getScale()
Returns:
Returns the scale.

getTime

public long getTime()
Returns:
Returns the time.

getTranslation

public javax.vecmath.Vector3f getTranslation()
Returns:
Returns the translation.

setKeyFrameId

public void setKeyFrameId(int keyFrameId)
Parameters:
keyFrameId - The keyFrameId to set.

setRotation

public void setRotation(javax.vecmath.Vector4f rotation)
Parameters:
rotation - The rotation to set.

setScale

public void setScale(javax.vecmath.Vector3f scale)
Parameters:
scale - The scale to set.

setTime

public void setTime(long time)
Parameters:
time - The time to set.

setTranslation

public void setTranslation(javax.vecmath.Vector3f translation)
Parameters:
translation - The translation to set.