org.jscience.physics.kinematics
Class RigidBody3D

java.lang.Object
  extended by org.jscience.physics.Particle
      extended by org.jscience.physics.kinematics.AbstractClassicalParticle
          extended by org.jscience.physics.kinematics.ClassicalParticle3D
              extended by org.jscience.physics.kinematics.RigidBody3D
All Implemented Interfaces:
java.io.Serializable, Positioned

public class RigidBody3D
extends ClassicalParticle3D

The RigidBody3D class provides an object for encapsulating rigid bodies that live in 3D.

See Also:
Serialized Form

Constructor Summary
RigidBody3D()
          Constructs a rigid body.
RigidBody3D(double m)
          Creates a new RigidBody3D object.
 
Method Summary
 RigidBody3D angularAccelerate(double ax, double ay, double az, double dt)
          Accelerates this particle.
 RigidBody3D applyForce(double fx, double fy, double fz, double x, double y, double z, double dt)
          Applies a force acting at a point away from the centre of mass.
 RigidBody3D applyForce(Force3D F, double x, double y, double z, double t, double dt)
          DOCUMENT ME!
 RigidBody3D applyTorque(double tx, double ty, double tz, double dt)
          Applies a torque to this particle.
 RigidBody3D applyTorque(Torque3D T, double t, double dt)
          Applies a torque to this particle.
 double energy()
          Returns the kinetic and rotational energy.
 double getMomentOfInertia()
          Returns the moment of inertia.
 double getXAngularMomentum()
          DOCUMENT ME!
 double getXAngularVelocity()
          DOCUMENT ME!
 double getXOrientation()
          Returns the x-axis angle of this body.
 double getYAngularMomentum()
          DOCUMENT ME!
 double getYAngularVelocity()
          DOCUMENT ME!
 double getYOrientation()
          Returns the y-axis angle of this body.
 double getZAngularMomentum()
          DOCUMENT ME!
 double getZAngularVelocity()
          DOCUMENT ME!
 double getZOrientation()
          Returns the z-axis angle of this body.
 AbstractClassicalParticle move(double dt)
          Evolves this particle forward according to its kinematics.
 RigidBody3D rotate(double dt)
          Evolves this particle forward according to its rotational kinematics.
 void setAngularMomentum(double angleXMom, double angleYMom, double angleZMom)
          DOCUMENT ME!
 void setAngularVelocity(double angleXVel, double angleYVel, double angleZVel)
          DOCUMENT ME!
 void setMomentOfInertia(double MoI)
          Sets the moment of inertia.
 void setOrientation(double angleX, double angleY, double angleZ)
          Sets the angles (orientation) of this body.
 
Methods inherited from class org.jscience.physics.kinematics.ClassicalParticle3D
accelerate, applyForce, applyForce, getCharge, getDimension, getMass, getMomentum, getPosition, getVelocity, getXMomentum, getXPosition, getXVelocity, getYMomentum, getYPosition, getYVelocity, getZMomentum, getZPosition, getZVelocity, setCharge, setMass, setMomentum, setPosition, setVelocity, setXPosition, setXVelocity, setYPosition, setYVelocity, setZPosition, setZVelocity, speed, translate
 
Methods inherited from class org.jscience.physics.kinematics.AbstractClassicalParticle
addForce, getForces, removeAllForces, removeForce, setForces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RigidBody3D

public RigidBody3D()
Constructs a rigid body.


RigidBody3D

public RigidBody3D(double m)
Creates a new RigidBody3D object.

Parameters:
m - DOCUMENT ME!
Method Detail

setMomentOfInertia

public void setMomentOfInertia(double MoI)
Sets the moment of inertia.

Parameters:
MoI - DOCUMENT ME!

getMomentOfInertia

public double getMomentOfInertia()
Returns the moment of inertia.

Returns:
DOCUMENT ME!

setOrientation

public void setOrientation(double angleX,
                           double angleY,
                           double angleZ)
Sets the angles (orientation) of this body.

Parameters:
angleX - an angle in radians.
angleY - an angle in radians.
angleZ - an angle in radians.

getXOrientation

public double getXOrientation()
Returns the x-axis angle of this body.

Returns:
an angle in radians.

getYOrientation

public double getYOrientation()
Returns the y-axis angle of this body.

Returns:
an angle in radians.

getZOrientation

public double getZOrientation()
Returns the z-axis angle of this body.

Returns:
an angle in radians.

setAngularVelocity

public void setAngularVelocity(double angleXVel,
                               double angleYVel,
                               double angleZVel)
DOCUMENT ME!

Parameters:
angleXVel - DOCUMENT ME!
angleYVel - DOCUMENT ME!
angleZVel - DOCUMENT ME!

getXAngularVelocity

public double getXAngularVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYAngularVelocity

public double getYAngularVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getZAngularVelocity

public double getZAngularVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setAngularMomentum

public void setAngularMomentum(double angleXMom,
                               double angleYMom,
                               double angleZMom)
DOCUMENT ME!

Parameters:
angleXMom - DOCUMENT ME!
angleYMom - DOCUMENT ME!
angleZMom - DOCUMENT ME!

getXAngularMomentum

public double getXAngularMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYAngularMomentum

public double getYAngularMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getZAngularMomentum

public double getZAngularMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

energy

public double energy()
Returns the kinetic and rotational energy.

Overrides:
energy in class ClassicalParticle3D
Returns:
DOCUMENT ME!

move

public AbstractClassicalParticle move(double dt)
Evolves this particle forward according to its kinematics. This method changes the particle's position and orientation.

Overrides:
move in class ClassicalParticle3D
Parameters:
dt - DOCUMENT ME!
Returns:
this.

rotate

public RigidBody3D rotate(double dt)
Evolves this particle forward according to its rotational kinematics. This method changes the particle's orientation.

Parameters:
dt - DOCUMENT ME!
Returns:
this.

angularAccelerate

public RigidBody3D angularAccelerate(double ax,
                                     double ay,
                                     double az,
                                     double dt)
Accelerates this particle. This method changes the particle's angular velocity. It is additive, that is angularAccelerate(a1, dt).angularAccelerate(a2, dt) is equivalent to angularAccelerate(a1+a2, dt).

Parameters:
ax - DOCUMENT ME!
ay - DOCUMENT ME!
az - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.

applyTorque

public RigidBody3D applyTorque(double tx,
                               double ty,
                               double tz,
                               double dt)
Applies a torque to this particle. This method changes the particle's angular velocity. It is additive, that is applyTorque(T1, dt).applyTorque(T2, dt) is equivalent to applyTorque(T1+T2, dt).

Parameters:
tx - DOCUMENT ME!
ty - DOCUMENT ME!
tz - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.

applyTorque

public RigidBody3D applyTorque(Torque3D T,
                               double t,
                               double dt)
Applies a torque to this particle. This method changes the particle's angular velocity. It is additive, that is applyTorque(T1, dt).applyTorque(T2, dt) is equivalent to applyTorque(T1+T2, dt).

Parameters:
T - DOCUMENT ME!
t - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.

applyForce

public RigidBody3D applyForce(double fx,
                              double fy,
                              double fz,
                              double x,
                              double y,
                              double z,
                              double dt)
Applies a force acting at a point away from the centre of mass. Any resultant torques are also applied. This method changes the particle's angular velocity.

Parameters:
fx - DOCUMENT ME!
fy - DOCUMENT ME!
fz - DOCUMENT ME!
x - x-coordinate from centre of mass.
y - y-coordinate from centre of mass.
z - z-coordinate from centre of mass.
dt - DOCUMENT ME!
Returns:
this.

applyForce

public RigidBody3D applyForce(Force3D F,
                              double x,
                              double y,
                              double z,
                              double t,
                              double dt)
DOCUMENT ME!

Parameters:
F - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!
z - DOCUMENT ME!
t - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
DOCUMENT ME!