edu.cmu.sun.animation
Class TranslationAnimation

java.lang.Object
  extended by edu.cmu.sun.animation.ScheduledAnimation
      extended by edu.cmu.sun.animation.TranslationAnimation
All Implemented Interfaces:
java.lang.Comparable<ScheduledAnimation>

public class TranslationAnimation
extends ScheduledAnimation

Adjusts the translation of a target Component3D.

Author:
Braden Kowitz

Field Summary
(package private)  boolean change
           
(package private)  javax.vecmath.Vector3f translation
           
 
Fields inherited from class edu.cmu.sun.animation.ScheduledAnimation
duration, startTime, target
 
Constructor Summary
TranslationAnimation(Component3D target, int startTime, int duration, javax.vecmath.Vector3f translation)
          Creates a new action to call changeTranslation();
TranslationAnimation(Component3D target, int startTime, javax.vecmath.Vector3f translation)
          Creates a new action to call setTranslation();
 
Method Summary
 void doAnimation()
          Performs the animation required for this ScheduledAnimation.
 
Methods inherited from class edu.cmu.sun.animation.ScheduledAnimation
compareTo, getEndTime, getStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translation

javax.vecmath.Vector3f translation

change

boolean change
Constructor Detail

TranslationAnimation

public TranslationAnimation(Component3D target,
                            int startTime,
                            int duration,
                            javax.vecmath.Vector3f translation)
Creates a new action to call changeTranslation();

Parameters:
target - Component to be called as a targt
startTime - Time this animation should start, in msec
duration - The duration of this animation, in msec
translation - Translation vector to be applied during the animation.

TranslationAnimation

public TranslationAnimation(Component3D target,
                            int startTime,
                            javax.vecmath.Vector3f translation)
Creates a new action to call setTranslation();

Parameters:
target - Component to be called as a targt
startTime - Time this animation should start, in msec
translation - Translation vector to be applied during the animation.
Method Detail

doAnimation

public void doAnimation()
Description copied from class: ScheduledAnimation
Performs the animation required for this ScheduledAnimation. Returns as soon as possible (nonblocking)

Specified by:
doAnimation in class ScheduledAnimation