|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmovements.PersonMovement
movements.PersonMovementInAUnit
This class implements a movement of a person over a period of time. This class is used when the person is participating in a unit. This class is given both the position of the person within the unit and a pointer to an object that defines the movement of the unit. This class is then able to calculate the position of the person.
A single object of this class is constructed to represent the entire movement of the person in the unit, even though the movement of the unit may consist of a series of sub-movements.
| Field Summary | |
private double |
facingR
|
private int |
forwardsOffset
|
private int |
sidewaysOffset
|
protected int |
tickLength
|
private PersonMovement |
unitMovement
|
private ParticipantPosition |
unitPosition
Work object used to obtain the position of the unit. |
| Constructor Summary | |
(package private) |
PersonMovementInAUnit(PersonMovement unitMovement,
int forwardsOffset,
int sidewaysOffset,
double facing)
Construct a movement of a person for the period that the person is participating in a unit. |
| Method Summary | |
(package private) ParticipantPosition |
getPosition(int ticksIntoMovement)
|
(package private) void |
getPosition(ParticipantPosition position,
int ticksIntoMovement)
|
(package private) int |
getTickLength()
|
private void |
readObject(java.io.ObjectInputStream in)
|
(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. |
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 int forwardsOffset
private int sidewaysOffset
private double facingR
private PersonMovement unitMovement
private transient ParticipantPosition unitPosition
protected int tickLength
| Constructor Detail |
PersonMovementInAUnit(PersonMovement unitMovement,
int forwardsOffset,
int sidewaysOffset,
double facing)
The time length of this movement is the same as the time length of the unit's movements.
unitMovement - A PersonMovement object that specifies the positions of the unit
during the movement.| Method Detail |
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
void getPosition(ParticipantPosition position,
int ticksIntoMovement)
getPosition in class PersonMovementpublic void Trace(java.lang.String indent)
Trace 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 | ||||||||||