movements
Class TrackSegment
java.lang.Object
movements.TrackSegment
- class TrackSegment
- extends java.lang.Object
|
Constructor Summary |
(package private) |
TrackSegment(double startPositionX,
double startPositionY,
double startDirection,
double finalPositionX,
double finalPositionY,
double finalDirection)
|
|
Method Summary |
private void |
AddCircularMovement(PersonMovementList movementList,
double centerX,
double centerY,
double radius,
double startPhase,
double startSpeed,
double acceleration,
int ticks)
|
private void |
AddStraightMovement(PersonMovementList movementList,
double startX,
double startY,
double direction,
double speed,
double acceleration,
int ticks)
|
private double |
ArcAngle(double startDirection,
double endDirection,
boolean turnToLeft)
|
(package private) void |
generateMovements(PersonMovementList movementList)
Adds movements to the given list of movements. |
(package private) double |
getDistance()
The total distance of the track taken by the participant when
making this move. |
(package private) double |
Radians(int degrees)
|
(package private) void |
setTickLength(int tickLength)
Set the amount of time to be taken to do this move. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
startPositionX
private double startPositionX
startPositionY
private double startPositionY
startDirection
private double startDirection
finalPositionX
private double finalPositionX
finalPositionY
private double finalPositionY
finalDirection
private double finalDirection
fSingleStraightLine
private boolean fSingleStraightLine
transitionPointX
private double transitionPointX
transitionPointY
private double transitionPointY
transitionDirection
private double transitionDirection
center1x
private double center1x
center1y
private double center1y
center2x
private double center2x
center2y
private double center2y
curvature1
private double curvature1
curvature2
private double curvature2
arcLength1
private double arcLength1
arcLength2
private double arcLength2
trackDistance
private double trackDistance
totalTicks
private int totalTicks
- Total number of ticks to carry out the movement.
This is set by setTickLength.
TrackSegment
TrackSegment(double startPositionX,
double startPositionY,
double startDirection,
double finalPositionX,
double finalPositionY,
double finalDirection)
throws MoveBackwardsException,
TurnOnSpotException
Radians
double Radians(int degrees)
ArcAngle
private double ArcAngle(double startDirection,
double endDirection,
boolean turnToLeft)
AddStraightMovement
private void AddStraightMovement(PersonMovementList movementList,
double startX,
double startY,
double direction,
double speed,
double acceleration,
int ticks)
AddCircularMovement
private void AddCircularMovement(PersonMovementList movementList,
double centerX,
double centerY,
double radius,
double startPhase,
double startSpeed,
double acceleration,
int ticks)
getDistance
double getDistance()
- The total distance of the track taken by the participant when
making this move. This method may be called before
setTickLength has been called to set the amount of time to
be taken to do this move.
setTickLength
void setTickLength(int tickLength)
- Set the amount of time to be taken to do this move.
This method must be called before generateMovements is
be called.
generateMovements
void generateMovements(PersonMovementList movementList)
- Adds movements to the given list of movements. The movements
added by this method will move a participant in a smooth manner
from the starting point to the end point given in the constructor.
Copyright © 2003 Nigel Westbury