|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aim4.vehicle.BasicVehicle.NonAccelMovement
public abstract static class BasicVehicle.NonAccelMovement
The non-acceleration movement
Field Summary | |
---|---|
protected double |
heading
The direction of the vehicle |
protected Point2D |
position
The position of the vehicle, represented by the point at the center of the front of the Vehicle. |
protected VehicleSpec |
spec
The specification of the vehicle |
protected double |
velocity
The velocity of the vehicle |
Constructor Summary | |
---|---|
BasicVehicle.NonAccelMovement(VehicleSpec spec,
Point2D position,
double heading,
double velocity)
Create a non-acceleration movement. |
Method Summary | |
---|---|
double |
getHeading()
Get the heading of the vehicle |
Point2D |
getPosition()
Get the position of the vehicle. |
VehicleSpec |
getVehicleSpec()
Get the vehicle specification. |
double |
getVelocity()
Get the velocity 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 |
Methods inherited from interface aim4.vehicle.BasicVehicle.Movement |
---|
move |
Field Detail |
---|
protected final VehicleSpec spec
protected Point2D position
protected double heading
protected double velocity
Constructor Detail |
---|
public BasicVehicle.NonAccelMovement(VehicleSpec spec, Point2D position, double heading, double velocity)
spec
- the specification of the vehicleposition
- the positionheading
- the headingvelocity
- the velocityMethod Detail |
---|
public final VehicleSpec getVehicleSpec()
public Point2D getPosition()
getPosition
in interface BasicVehicle.Movement
public double getHeading()
getHeading
in interface BasicVehicle.Movement
public double getVelocity()
getVelocity
in interface BasicVehicle.Movement
protected 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 |