|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.physics.Particle JSci.physics.AbstractClassicalParticle JSci.physics.ClassicalParticle3D JSci.physics.RigidBody3D
public class RigidBody3D
The RigidBody3D class provides an object for encapsulating rigid bodies that live in 3D.
Field Summary | |
---|---|
protected double |
angMass
Moment of inertia. |
protected double |
angx
Angles (orientation). |
protected double |
angxVel
Angular velocity. |
protected double |
angy
Angles (orientation). |
protected double |
angyVel
Angular velocity. |
protected double |
angz
Angles (orientation). |
protected double |
angzVel
Angular velocity. |
Fields inherited from class JSci.physics.ClassicalParticle3D |
---|
mass, vx, vy, vz, x, y, z |
Constructor Summary | |
---|---|
RigidBody3D()
Constructs a rigid body. |
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 |
applyTorque(double tx,
double ty,
double tz,
double dt)
Applies a torque to this particle. |
double |
energy()
Returns the kinetic and rotational energy. |
double |
getMomentOfInertia()
Returns the moment of inertia. |
double |
getXAngle()
Returns the x-axis angle of this body. |
double |
getXAngularMomentum()
|
double |
getXAngularVelocity()
|
double |
getYAngle()
Returns the y-axis angle of this body. |
double |
getYAngularMomentum()
|
double |
getYAngularVelocity()
|
double |
getZAngle()
Returns the z-axis angle of this body. |
double |
getZAngularMomentum()
|
double |
getZAngularVelocity()
|
ClassicalParticle3D |
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 |
setAngles(double angleX,
double angleY,
double angleZ)
Sets the angles (orientation) of this body. |
void |
setAngularMomentum(double angleXMom,
double angleYMom,
double angleZMom)
|
void |
setAngularVelocity(double angleXVel,
double angleYVel,
double angleZVel)
|
void |
setMomentOfInertia(double MoI)
Sets the moment of inertia. |
Methods inherited from class JSci.physics.ClassicalParticle3D |
---|
accelerate, applyForce, getMass, getMomentum, getPosition, getVelocity, getXMomentum, getXPosition, getXVelocity, getYMomentum, getYPosition, getYVelocity, getZMomentum, getZPosition, getZVelocity, gravitate, setMass, setMomentum, setPosition, setVelocity, setXPosition, setYPosition, setZPosition, speed, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double angMass
protected double angx
protected double angy
protected double angz
protected double angxVel
protected double angyVel
protected double angzVel
Constructor Detail |
---|
public RigidBody3D()
Method Detail |
---|
public void setMomentOfInertia(double MoI)
public double getMomentOfInertia()
public void setAngles(double angleX, double angleY, double angleZ)
angleX
- an angle in radians.angleY
- an angle in radians.angleZ
- an angle in radians.public double getXAngle()
public double getYAngle()
public double getZAngle()
public void setAngularVelocity(double angleXVel, double angleYVel, double angleZVel)
public double getXAngularVelocity()
public double getYAngularVelocity()
public double getZAngularVelocity()
public void setAngularMomentum(double angleXMom, double angleYMom, double angleZMom)
public double getXAngularMomentum()
public double getYAngularMomentum()
public double getZAngularMomentum()
public double energy()
energy
in class ClassicalParticle3D
public ClassicalParticle3D move(double dt)
move
in class ClassicalParticle3D
public RigidBody3D rotate(double dt)
public RigidBody3D angularAccelerate(double ax, double ay, double az, double dt)
angularAccelerate(a1, dt).angularAccelerate(a2, dt)
is equivalent to angularAccelerate(a1+a2, dt)
.
public RigidBody3D applyTorque(double tx, double ty, double tz, double dt)
applyTorque(T1, dt).applyTorque(T2, dt)
is equivalent to applyTorque(T1+T2, dt)
.
public RigidBody3D applyForce(double fx, double fy, double fz, double x, double y, double z, double dt)
x
- x-coordinate from centre of mass.y
- y-coordinate from centre of mass.z
- z-coordinate from centre of mass.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |