game.motion
Class Stationary

java.lang.Object
  extended by game.motion.Stationary
All Implemented Interfaces:
Trajectory
Direct Known Subclasses:
ConstantVelocity

public class Stationary
extends java.lang.Object
implements Trajectory

An object sitting still, with zero velocity and acceleration. This is the simplest of the three velocity classes.


Constructor Summary
Stationary(lab4.Point origin)
           
Stationary(Trajectory old)
           
 
Method Summary
 lab4.Vector getCurrentAcceleration()
          Current acceleration
 lab4.Point getCurrentLocation()
          Current location
 lab4.Vector getCurrentVelocity()
          Current velocity
 lab4.Point getLocation(Time t)
          Location at a given time.
 Time getT0()
          Time when this Trajectory began
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stationary

public Stationary(Trajectory old)

Stationary

public Stationary(lab4.Point origin)
Method Detail

getT0

public Time getT0()
Description copied from interface: Trajectory
Time when this Trajectory began

Specified by:
getT0 in interface Trajectory
Returns:
time origin of this Trajectory

getCurrentLocation

public final lab4.Point getCurrentLocation()
Description copied from interface: Trajectory
Current location

Specified by:
getCurrentLocation in interface Trajectory
Returns:
current location

getLocation

public lab4.Point getLocation(Time t)
Description copied from interface: Trajectory
Location at a given time.

Specified by:
getLocation in interface Trajectory
Parameters:
t - time at which location should be computed, relative to time origin.
Returns:
current location at time t

getCurrentVelocity

public lab4.Vector getCurrentVelocity()
Description copied from interface: Trajectory
Current velocity

Specified by:
getCurrentVelocity in interface Trajectory
Returns:
current velocity

getCurrentAcceleration

public lab4.Vector getCurrentAcceleration()
Description copied from interface: Trajectory
Current acceleration

Specified by:
getCurrentAcceleration in interface Trajectory
Returns:
current acceleration