|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.highpoint.titus.apps.osp.canonicalspaceship.CanonicalSpaceShip
Constructor Summary | |
CanonicalSpaceShip()
The constructor. |
Method Summary | |
void |
getRate(double[] state,
double[] rate)
Gets the rate of change using the argument's state variables. |
double[] |
getState()
Get the state of the spaceship. |
void |
initialize(org.opensourcephysics.display.DrawingPanel drawingPanel,
double x,
double y,
double z,
double vx,
double vy,
double vz,
double dt,
boolean thrustN,
boolean thrustS,
boolean thrustE,
boolean thrustW,
double magThrust)
Initialize the spaceship |
void |
stepState()
Step the state forward in time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CanonicalSpaceShip()
Method Detail |
public double[] getState()
getState
in interface org.opensourcephysics.numerics.ODE
public void getRate(double[] state, double[] rate)
org.opensourcephysics.numerics.ODE
getRate
in interface org.opensourcephysics.numerics.ODE
state
- the state arrayrate
- the rate arraypublic void initialize(org.opensourcephysics.display.DrawingPanel drawingPanel, double x, double y, double z, double vx, double vy, double vz, double dt, boolean thrustN, boolean thrustS, boolean thrustE, boolean thrustW, double magThrust)
drawingPanel
- the drawing panel that will dispaly the particlesx
- x positiony
- y positionvx
- x velocityvy
- y velocityvz
- z velocitydt
- time step for ODE solverthrustN
- on/off (1 or 0) for N enginethrustS
- on/off (1 or 0) for S enginethrustE
- on/off (1 or 0) for E enginethrustW
- on/off (1 or 0) for W enginemagThrust
- magnitude of engine thrust
public void stepState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |