|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaim4.vehicle.BasicVehicle.PhysicalMovement
aim4.vehicle.BasicVehicle.MoveToTargetVelocityMovement
public static class BasicVehicle.MoveToTargetVelocityMovement
A move-to-target-velocity movement.
Field Summary |
---|
Fields inherited from class aim4.vehicle.BasicVehicle.PhysicalMovement |
---|
spec |
Constructor Summary | |
---|---|
BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement,
double acceleration,
double targetVelocity)
Create a move-to-target-velocity movement. |
|
BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec,
Point2D position,
double heading,
double velocity,
double steeringAngle,
double acceleration,
double targetVelocity)
Create a move-to-target-velocity movement. |
Method Summary | |
---|---|
void |
coast()
Maintain the speed of the vehicle. |
void |
move(double currentTime,
double timeStep)
Move the vehicle for a given period of time. |
void |
setAccelerationWithBound(double acceleration)
Set the acceleration with respect to the physical limit of the vehicle. |
void |
setAccelWithMaxTargetVelocity(double acceleration)
Set the acceleration with maximum target velocity. |
void |
setMaxAccelWithMaxTargetVelocity()
Set the Vehicle's acceleration to its maximum value. |
void |
setTargetVelocityWithBound(double targetVelocity)
Set the target velocity of the velocity |
void |
setTargetVelocityWithMaxAccel(double targetVelocity)
Set the target velocity (with maximum acceleration). |
void |
slowToStop()
Set the Vehicle's acceleration to its minimum value without going backward. |
String |
toString()
|
Methods inherited from class aim4.vehicle.BasicVehicle.PhysicalMovement |
---|
getAcceleration, getHeading, getNonAccelMovement, getPosition, getVelocity, moveWithoutAcceleration, setVelocityWithBound |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec, Point2D position, double heading, double velocity, double steeringAngle, double acceleration, double targetVelocity)
spec
- the vehicle specificationposition
- the positionheading
- the headingvelocity
- the velocitysteeringAngle
- the steering angleacceleration
- the accelerationtargetVelocity
- the target velocitypublic BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement, double acceleration, double targetVelocity)
basicMovement
- the basic movementacceleration
- targetVelocity
- Method Detail |
---|
public void setTargetVelocityWithBound(double targetVelocity)
targetVelocity
- the target velocitypublic void setAccelerationWithBound(double acceleration)
setAccelerationWithBound
in interface BasicVehicle.MovementWithAccel
setAccelerationWithBound
in class BasicVehicle.PhysicalMovement
acceleration
- the accelerationpublic void coast()
coast
in class BasicVehicle.PhysicalMovement
public void slowToStop()
public void setMaxAccelWithMaxTargetVelocity()
public void setTargetVelocityWithMaxAccel(double targetVelocity)
targetVelocity
- the target velocitypublic void setAccelWithMaxTargetVelocity(double acceleration)
acceleration
- the accelerationpublic void move(double currentTime, double timeStep)
move
in interface BasicVehicle.Movement
move
in class BasicVehicle.PhysicalMovement
currentTime
- the current timetimeStep
- the period of time for which the vehicle moves.public String toString()
toString
in class BasicVehicle.PhysicalMovement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |