|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgame.motion.Stationary
game.motion.ConstantVelocity
game.motion.ConstantAcceleration
public class ConstantAcceleration
Extends ConstantVelocity by contributing a constant (but not necessarily zero) acceleration.
| Constructor Summary | |
|---|---|
ConstantAcceleration(lab4.Point origin,
lab4.Vector v,
lab4.Vector a)
A new Trajectory based on the point of origin, a velocity, and an acceleration |
|
ConstantAcceleration(Trajectory old,
lab4.Vector v,
lab4.Vector a)
Constructs a new Trajectory based on the current location of the supplied one. |
|
| Method Summary | |
|---|---|
lab4.Vector |
getCurrentAcceleration()
Current acceleration |
lab4.Vector |
getCurrentVelocity()
Current velocity computed as v + at |
lab4.Point |
getLocation(Time t)
Current location computed as origin + vt + 1/2at^2 |
| Methods inherited from class game.motion.Stationary |
|---|
getCurrentLocation, getT0 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface game.motion.Trajectory |
|---|
getCurrentLocation, getT0 |
| Constructor Detail |
|---|
public ConstantAcceleration(Trajectory old,
lab4.Vector v,
lab4.Vector a)
old - Trajectory for computing the current location.v - Velocity of the new Trajectorya - Acceleration of the new Trajectory
public ConstantAcceleration(lab4.Point origin,
lab4.Vector v,
lab4.Vector a)
origin - Point of originv - original velocitya - constant acceleration| Method Detail |
|---|
public lab4.Point getLocation(Time t)
getLocation in interface TrajectorygetLocation in class ConstantVelocityt - time at which location should be computed, relative to time origin.
public lab4.Vector getCurrentVelocity()
getCurrentVelocity in interface TrajectorygetCurrentVelocity in class ConstantVelocitypublic lab4.Vector getCurrentAcceleration()
getCurrentAcceleration in interface TrajectorygetCurrentAcceleration in class Stationary
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||