org.opensourcephysics.sip.ch17
Class RigidBody

java.lang.Object
  extended by org.opensourcephysics.sip.ch17.RigidBody
All Implemented Interfaces:
ODE
Direct Known Subclasses:
FreeRotation, SpinningTop

public class RigidBody
extends java.lang.Object
implements ODE

RigidBody models rigid body dynamics by solving Euler's equations using an ODE solver.


Constructor Summary
RigidBody()
           
 
Method Summary
 void advanceTime()
          Advances the time be solving the differential equation.
 double[] getBodyFrameAngularMomentum()
          Gets the space frame angular momentum components.
 double[] getBodyFrameOmega()
          Gets the space frame angular velocity components.
 void getRate(double[] state, double[] rate)
          Gets the rate of the rigid body's state using the given state.
 double[] getState()
          Gets the state of the rigid body.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RigidBody

public RigidBody()
Method Detail

getBodyFrameOmega

public double[] getBodyFrameOmega()
Gets the space frame angular velocity components.

Returns:
the omega vector

getBodyFrameAngularMomentum

public double[] getBodyFrameAngularMomentum()
Gets the space frame angular momentum components.

Returns:
the angular momentum vector

advanceTime

public void advanceTime()
Advances the time be solving the differential equation.


getState

public double[] getState()
Gets the state of the rigid body.

Specified by:
getState in interface ODE
Returns:
double[]

getRate

public void getRate(double[] state,
                    double[] rate)
Gets the rate of the rigid body's state using the given state.

Specified by:
getRate in interface ODE
Parameters:
state - double[]
rate - double[]