edu.cmu.sun.animation
Class ScaleAnimation

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

public class ScaleAnimation
extends ScheduledAnimation

Adjusts the scale of a Component3D.

Author:
Braden Kowitz

Field Summary
(package private)  boolean change
           
(package private)  javax.vecmath.Vector3f scale
           
 
Fields inherited from class edu.cmu.sun.animation.ScheduledAnimation
duration, startTime, target
 
Constructor Summary
ScaleAnimation(Component3D target, int startTime, int duration, javax.vecmath.Vector3f scale)
          Creates a new action to call changeScale();
ScaleAnimation(Component3D target, int startTime, javax.vecmath.Vector3f scale)
          Creates a new action to call setScale();
 
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

scale

javax.vecmath.Vector3f scale

change

boolean change
Constructor Detail

ScaleAnimation

public ScaleAnimation(Component3D target,
                      int startTime,
                      int duration,
                      javax.vecmath.Vector3f scale)
Creates a new action to call changeScale();

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
scale - Scaling vector to be applied as the animation.

ScaleAnimation

public ScaleAnimation(Component3D target,
                      int startTime,
                      javax.vecmath.Vector3f scale)
Creates a new action to call setScale();

Parameters:
target - Component to be called as a targt
startTime - Time this animation should start, in msec
scale - Scaling vector to be applied as 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