movements
Class PersonMovement
java.lang.Object
movements.PersonMovement
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- PersonMovementAlone, PersonMovementFix, PersonMovementInAUnit, PersonMovementInTransition, PersonMovementList, PersonMovementSplitter, PersonMovementTimeShifted
- abstract class PersonMovement
- extends java.lang.Object
- implements java.io.Serializable
An object of this class represents a movement of a person
over a period of time. A person's position is defined using
three co-ordinates giving the distance down the set, the
distance across the set, and the direction in which the person
is facing.
This class is abstract. Classes are derived from this class that
implement various movements. For example, a derived class
may implement a movement in a straight line, another derived class may
implement a movement in a circle.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tickLength
protected int tickLength
PersonMovement
PersonMovement(int tickLength)
getTickLength
int getTickLength()
getPosition
abstract void getPosition(ParticipantPosition position,
int ticksIntoMovement)
getPosition
ParticipantPosition getPosition(int ticksIntoMovement)
Trace
public void Trace(java.lang.String indent)
splitMovement
final PersonMovement splitMovement(int subPeriodStartTick,
int subPeriodEndTick)
- Provides a movement that covers only a period of this movement.
This method does some error checking and handles the request in
a couple of trivial situations. It calls an implementation specific
method to handle the non-trivial cases.
splitMovementInternal
protected PersonMovement splitMovementInternal(int subPeriodStartTick,
int subPeriodEndTick)
- Provides a movement that covers only a period of this movement.
This is a default implementation that uses the PersonMovementSplitter
to provide the desired sub-movement.
However, most implementations of PersonMovement can do this more efficiently
and so override this method. By allowing each PersonMovement implementation
to implement this, we get a simpler tree of PersonMovement objects.
Copyright © 2003 Nigel Westbury