|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VehicleDriverView
The interface of a vehicle from the viewpoint of a driver.
Method Summary | |
---|---|
void |
coast()
Set the acceleration to zero. |
double |
gaugeHeading()
Get this Vehicle's compass gauge's reading. |
Point2D |
gaugePointAtMiddleFront(double delta)
Get the point in front of the middle point of the vehicle that is at the distance of delta away from the vehicle, according to the gauges. |
Point2D |
gaugePointAtRear()
Get the point at the rear center of the vehicle, according to our gauges |
Point2D |
gaugePointBetweenFrontWheels()
Get the point between the front wheels, according to our gauges. |
Point2D |
gaugePosition()
Get the current position of this Vehicle, represented by the point at the center of the front of the Vehicle, according to the Vehicle's gauges. |
Point2D |
gaugeRearLeftCornerPoint()
Get the current global coordinate of the rear-left corner of this Vehicle, according to the Vehicle's gauges. |
Point2D |
gaugeRearRightCornerPoint()
Get the current global coordinate of the rear-right corner of this Vehicle, according to the Vehicle's gauges. |
Shape |
gaugeShape()
Get a Shape describing the Vehicle, according to the Vehicle's
gauges. |
double |
gaugeTime()
Read this Vehicle's clock (chronometer). |
double |
gaugeVelocity()
Get this Vehicle's speedometer gauge's reading. |
AccelSchedule |
getAccelSchedule()
Get the acceleration profile. |
Driver |
getDriver()
Getter method for the Driver controlling this Vehicle. |
VehicleSpec |
getSpec()
Get the specification of the vehicle |
int |
getVIN()
Get the ID number of this vehicle. |
void |
printState()
print the state of the driver. |
void |
removeAccelSchedule()
Remove the acceleration profile. |
void |
setAccelSchedule(AccelSchedule accelProfile)
Set the acceleration profile. |
void |
setAccelWithMaxTargetVelocity(double acceleration)
Set the acceleration to the specified value, using maximum and minimum velocities as targets, automatically. |
void |
setTargetVelocityWithMaxAccel(double targetVelocity)
Set the acceleration to the appropriate value to reach the target velocity, based on the current speedometer reading. |
void |
slowToStop()
Set the Vehicle's acceleration to its minimum value without going backward. |
void |
turnTowardPoint(Point2D p)
Turn the wheels toward a given Point. |
Method Detail |
---|
int getVIN()
VehicleSpec getSpec()
Driver getDriver()
null
if none exists.AccelSchedule getAccelSchedule()
double gaugeTime()
Point2D gaugePosition()
double gaugeHeading()
double gaugeVelocity()
Shape gaugeShape()
Shape
describing the Vehicle, according to the Vehicle's
gauges.
Point2D gaugePointAtMiddleFront(double delta)
delta
- the distance of the vehicle and the point,
according to the gauges
Point2D gaugePointBetweenFrontWheels()
Point2D gaugePointAtRear()
Point2D gaugeRearLeftCornerPoint()
Point2D gaugeRearRightCornerPoint()
void setTargetVelocityWithMaxAccel(double targetVelocity)
targetVelocity
- the desired ultimate velocityvoid setAccelSchedule(AccelSchedule accelProfile)
accelProfile
- the acceleration profilevoid removeAccelSchedule()
void turnTowardPoint(Point2D p)
p
- the Point toward which to turn the wheelsvoid setAccelWithMaxTargetVelocity(double acceleration)
acceleration
- the desired acceleration.void coast()
void slowToStop()
void printState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |