movements
Class PersonMovementFix
java.lang.Object
movements.PersonMovement
movements.PersonMovementFix
- All Implemented Interfaces:
- java.io.Serializable
- class PersonMovementFix
- extends PersonMovement
This class implements a movement of a participant that is in fact a movement
over a time period of zero length. It basically fixes a person to a point at a specific
time.
This type of movement is used with transition processing,
because transitions are carried out to connect two otherwise disjointed
movements together. A transition may occur entirely before or entirely
after the transition point. If there is otherwise no movement on
the other side of the transition then we need a movement that lasts zero bars.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
down
private double down
across
private double across
facing
private double facing
tickLength
protected int tickLength
PersonMovementFix
PersonMovementFix(ParticipantPosition position)
getPosition
void getPosition(ParticipantPosition position,
int ticksIntoMovement)
- Specified by:
getPosition in class PersonMovement
Trace
public void Trace(java.lang.String indent)
- Overrides:
Trace in class PersonMovement
getTickLength
int getTickLength()
getPosition
ParticipantPosition getPosition(int ticksIntoMovement)
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