aim4.vehicle
Class BasicVehicle.AccelScheduleMovement

java.lang.Object
  extended by aim4.vehicle.BasicVehicle.AccelScheduleMovement
All Implemented Interfaces:
BasicVehicle.Movement
Enclosing class:
BasicVehicle

public static class BasicVehicle.AccelScheduleMovement
extends Object
implements BasicVehicle.Movement

The acceleration schedule movement.


Constructor Summary
BasicVehicle.AccelScheduleMovement(BasicVehicle.MovementWithAccel baseMovement)
          Create an acceleration schedule movement.
BasicVehicle.AccelScheduleMovement(BasicVehicle.MovementWithAccel baseMovement, AccelSchedule accelSchedule)
          Create an acceleration schedule movement.
 
Method Summary
 double getAcceleration()
          Get the acceleration.
 AccelSchedule getAccelSchedule()
          Get the acceleration schedule.
 BasicVehicle.MovementWithAccel getBaseMovement()
          Get the base movement.
 double getHeading()
          Get the heading of the vehicle
 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.
 void setAccelSchedule(AccelSchedule accelSchedule)
          Set the acceleration schedule.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicVehicle.AccelScheduleMovement

public BasicVehicle.AccelScheduleMovement(BasicVehicle.MovementWithAccel baseMovement)
Create an acceleration schedule movement.

Parameters:
baseMovement - the base movement

BasicVehicle.AccelScheduleMovement

public BasicVehicle.AccelScheduleMovement(BasicVehicle.MovementWithAccel baseMovement,
                                          AccelSchedule accelSchedule)
Create an acceleration schedule movement.

Parameters:
baseMovement - the base movement
accelSchedule - the acceleration schedule
Method Detail

getPosition

public Point2D getPosition()
Get the position of the vehicle.

Specified by:
getPosition in interface BasicVehicle.Movement
Returns:
the position of the vehicle

getHeading

public double getHeading()
Get the heading of the vehicle

Specified by:
getHeading in interface BasicVehicle.Movement
Returns:
the heading of the vehicle

getVelocity

public double getVelocity()
Get the velocity of the vehicle

Specified by:
getVelocity in interface BasicVehicle.Movement
Returns:
the velocity of the vehicle

getAcceleration

public double getAcceleration()
Get the acceleration.

Returns:
the acceleration

getBaseMovement

public BasicVehicle.MovementWithAccel getBaseMovement()
Get the base movement.

Returns:
the base movement

getAccelSchedule

public AccelSchedule getAccelSchedule()
Get the acceleration schedule.

Returns:
the acceleration schedule

setAccelSchedule

public void setAccelSchedule(AccelSchedule accelSchedule)
Set the acceleration schedule.

Parameters:
accelSchedule - the acceleration schedule

move

public void move(double currentTime,
                 double timeStep)
Move the vehicle for a given period of time.

Specified by:
move in interface BasicVehicle.Movement
Parameters:
currentTime - the current time
timeStep - the period of time for which the vehicle moves.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.