edu.cmu.sun.animation
Class RotationAnimation
java.lang.Object
edu.cmu.sun.animation.ScheduledAnimation
edu.cmu.sun.animation.RotationAnimation
- All Implemented Interfaces:
- java.lang.Comparable<ScheduledAnimation>
public class RotationAnimation
- extends ScheduledAnimation
Adjusts the rotation of a target Component3D.
Rotation is accomplished first by setting the rotation axis, then
by rotating a specified number of degrees.
- Author:
- Braden Kowitz
|
Field Summary |
(package private) float |
angle
|
(package private) javax.vecmath.Vector3f |
axis
|
(package private) boolean |
change
|
|
Constructor Summary |
RotationAnimation(Component3D target,
int startTime,
int duration,
javax.vecmath.Vector3f axis,
float angle)
Creates a new action to call changeRotation(); |
RotationAnimation(Component3D target,
int startTime,
javax.vecmath.Vector3f axis,
float angle)
Creates a new action to call setRotation(); |
|
Method Summary |
void |
doAnimation()
Performs the animation required for this ScheduledAnimation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
axis
javax.vecmath.Vector3f axis
angle
float angle
change
boolean change
RotationAnimation
public RotationAnimation(Component3D target,
int startTime,
int duration,
javax.vecmath.Vector3f axis,
float angle)
- Creates a new action to call changeRotation();
- Parameters:
target - Component to be called as a targtstartTime - Time this animation should start, in msecduration - The duration of this animation, in msecaxis - The axis of rotation (yaw, pitch, roll) in radians from X-axis.angle - The angle of rotation, in radians
RotationAnimation
public RotationAnimation(Component3D target,
int startTime,
javax.vecmath.Vector3f axis,
float angle)
- Creates a new action to call setRotation();
- Parameters:
target - Component to be called as a targtstartTime - Time this animation should start, in msecaxis - The axis of rotation (yaw, pitch, roll) in radians from X-axis.angle - The angle of rotation, in radians
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