public static class BasicVehicle.TrackMovement extends BasicVehicle.NonAccelMovement
heading, position, spec, velocity
Constructor and Description |
---|
BasicVehicle.TrackMovement(VehicleSpec spec,
Point2D position,
double heading,
double velocity,
TrackPosition trackPosition,
BasicVehicle.MovementFactory baseMovementFactory)
Create a track movement.
|
Modifier and Type | Method and Description |
---|---|
void |
move(double currentTime,
double timeStep)
Move the vehicle for a given period of time.
|
String |
toString() |
getHeading, getPosition, getVehicleSpec, getVelocity, setVelocityWithBound
public BasicVehicle.TrackMovement(VehicleSpec spec, Point2D position, double heading, double velocity, TrackPosition trackPosition, BasicVehicle.MovementFactory baseMovementFactory)
spec
- the vehicle specificationposition
- the positionheading
- the headingvelocity
- the velocitytrackPosition
- the track positionbaseMovementFactory
- the base movement factorypublic void move(double currentTime, double timeStep)
currentTime
- the current timetimeStep
- the period of time for which the vehicle moves.public String toString()
toString
in class BasicVehicle.NonAccelMovement
Copyright © 2013. All rights reserved.