|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.vehicle.BasicVehicle.PhysicalMovement
public static class BasicVehicle.PhysicalMovement
The physical movement.
| Field Summary | |
|---|---|
protected VehicleSpec |
spec
The specification of the vehicle |
| Constructor Summary | |
|---|---|
BasicVehicle.PhysicalMovement(BasicVehicle.NonAccelMovement nonAccelMovement,
double acceleration)
Create the physical movement. |
|
| Method Summary | |
|---|---|
void |
coast()
Maintain the speed of the vehicle. |
double |
getAcceleration()
Get the acceleration of the vehicle |
double |
getHeading()
Get the heading of the vehicle |
BasicVehicle.NonAccelMovement |
getNonAccelMovement()
Get the non acceleration movement. |
Point2D |
getPosition()
Get the position of the vehicle. |
double |
getVelocity()
Get the velocity of the vehicle |
void |
move(double currentTime,
double timeStep)
Move the vehicle for a given period of time. |
protected void |
moveWithoutAcceleration(double currentTime,
double timeStep)
Move the vehicle while holding all vehicle properties, including the acceleration, constant. |
void |
setAccelerationWithBound(double acceleration)
Set the acceleration with respect to the physical limit of the vehicle. |
protected void |
setVelocityWithBound(double velocity)
Set the velocity with respect to the physical limit of the vehicle. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final VehicleSpec spec
| Constructor Detail |
|---|
public BasicVehicle.PhysicalMovement(BasicVehicle.NonAccelMovement nonAccelMovement,
double acceleration)
nonAccelMovement - the non-acceleration movementacceleration - the acceleration| Method Detail |
|---|
public Point2D getPosition()
getPosition in interface BasicVehicle.Movementpublic double getHeading()
getHeading in interface BasicVehicle.Movementpublic double getVelocity()
getVelocity in interface BasicVehicle.Movementpublic double getAcceleration()
getAcceleration in interface BasicVehicle.MovementWithAccelpublic BasicVehicle.NonAccelMovement getNonAccelMovement()
public void setAccelerationWithBound(double acceleration)
setAccelerationWithBound in interface BasicVehicle.MovementWithAccelacceleration - the accelerationpublic void coast()
public void move(double currentTime,
double timeStep)
move in interface BasicVehicle.MovementcurrentTime - the current timetimeStep - the period of time for which the vehicle moves.
protected void moveWithoutAcceleration(double currentTime,
double timeStep)
currentTime - the current timetimeStep - the length of time for which to move the Vehicleprotected void setVelocityWithBound(double velocity)
velocity - the velocitypublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||