|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmovements.PersonMovement
movements.PersonMovementList
This class is a PersonMovement implementation for a movement that is a list of movements. The length of this movement is the sum of the lengths of the movements in the list. Every movement in the list must start where the previous movement ended with the participant both in the same position and facing in the same direction.
| Field Summary | |
private int |
cachedMovementIndex
|
private int |
cachedMovementStartTick
|
private java.util.Vector |
subMovements
The array of sub-movements. |
protected int |
tickLength
|
| Constructor Summary | |
(package private) |
PersonMovementList()
Construct an empty list of movements. |
| Method Summary | |
(package private) void |
AddSubMovement(PersonMovement movement)
Append a movement to the end of the list of movements. |
(package private) ParticipantPosition |
getPosition(int ticksIntoMovement)
|
(package private) void |
getPosition(ParticipantPosition position,
int ticksIntoMovement)
|
(package private) int |
getTickLength()
|
(package private) boolean |
isEmpty()
|
(package private) PersonMovement |
splitMovement(int subPeriodStartTick,
int subPeriodEndTick)
Provides a movement that covers only a period of this movement. |
protected PersonMovement |
splitMovementInternal(int subPeriodStartTick,
int subPeriodEndTick)
Provides a movement that covers only a period of this movement. |
protected PersonMovement |
subMovementAt(int index)
Wrapper for the subMovements Vector member. |
void |
Trace(java.lang.String indent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.Vector subMovements
private transient int cachedMovementIndex
private transient int cachedMovementStartTick
protected int tickLength
| Constructor Detail |
PersonMovementList()
| Method Detail |
void AddSubMovement(PersonMovement movement)
All movements must start with the participant in the same position (including facing in the same direction) as when the previous movement ended. The PersonMovement interface requires that all movements are continuous.
protected PersonMovement subMovementAt(int index)
boolean isEmpty()
public void Trace(java.lang.String indent)
Trace in class PersonMovement
void getPosition(ParticipantPosition position,
int ticksIntoMovement)
getPosition in class PersonMovement
protected PersonMovement splitMovementInternal(int subPeriodStartTick,
int subPeriodEndTick)
PersonMovement
splitMovementInternal in class PersonMovementint getTickLength()
ParticipantPosition getPosition(int ticksIntoMovement)
final PersonMovement splitMovement(int subPeriodStartTick,
int subPeriodEndTick)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||