public class TurtleTurnAnimator extends TurnAnimator
| Constructor and Description |
|---|
TurtleTurnAnimator(Turtle turtle,
double startDirection,
double endDirection,
boolean clockwise)
Constructs turn animator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
animate(double fraction)
Changes the state of object with respect current phase of animation.
|
computeDirection, getAngleChange, getWeightpublic TurtleTurnAnimator(Turtle turtle, double startDirection, double endDirection, boolean clockwise)
turtle - the animated turtle.startDirection - the initial direction in degrees when animation startsendDirection - the final direction in degrees after animationclockwise - the direction of rotation (turning).public void animate(double fraction)
Animatorfraction - the animation fraction - a real number between 0 and 1.Copyright © 2017. All rights reserved.