|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.math.DynamicState
public final class DynamicState
Provides dynamic state of an object. The orientation and position relate
object coordinates to world coordinates. Units should be consistent: mass,
length, time. Typically acelerations are the only inputs, both for position
and orientation, using the addXAcceleration() methods.
| Constructor Summary | |
|---|---|
DynamicState()
|
|
| Method Summary | |
|---|---|
void |
addAcceleration(Vector acceleration)
Add a positional acceleration. |
void |
addAngularAcceleration(Quaternion acceleration)
Add an angular acceleration. |
void |
addMassAcceleration(double massAcceleration)
Add a mass velocity rate of change. |
void |
applyForce(Vector force)
Apply the given force through the center of mass to this object. |
void |
applyForce(Vector force,
Vector position)
Apply the given force at the given position to this object. |
void |
applyForceLocal(Vector force,
Vector position)
Apply the given force at the given position to this object where these vectors are expressed in local coordinates. |
protected void |
applyTorque(Vector force,
Vector position)
Apply the given torque to this object where these vectors are expressed in local coordinates. |
Object |
clone()
Return a clone of this instance. |
Vector |
convertLocalToWorld(Vector v)
Convert the given vector from local coordinates to world coordinates. |
Vector |
convertWorldToLocal(Vector v)
Convert the given vector from world coordinates to local coordinates. |
Vector |
getAcceleration()
Return the acceleration in length time^-2 units. |
Quaternion |
getAngularAcceleration()
Return the angular acceleration in radians time^-2 units. |
Quaternion |
getAngularVelocity()
Return the angular velocity in radians time^-1 units. |
double |
getMass()
Return the mass in mass units. |
double |
getMassAcceleration()
Return the mass velocity rate of change in mass time^-2 units. |
double |
getMassVelocity()
Return the mass rate of change in mass time^-1 units. |
double[] |
getMomentOfInertia()
Return the moment of inertia in mass length^2 units. |
Quaternion |
getOrientation()
Return the orientation quaternion. |
Vector |
getPosition()
Return the position vector. |
Vector |
getPreviousPosition()
Return the previous position vector. |
Vector |
getVelocity()
Return the velocity in length time^-1 units. |
void |
move(Vector movement)
Move using the given vector. |
Vector |
orientLocalToWorld(Vector v)
Orient the given vector from local coordinates to world coordinates. |
Vector |
orientWorldToLocal(Vector v)
Orient the given vector from world coordinates to local coordinates. |
void |
rotate(Quaternion rotation)
Rotate using the given quaternion. |
void |
setAcceleration(Vector acceleration)
Set the acceleration. |
void |
setAngularAcceleration(Quaternion angularAcceleration)
Set the angular acceleration. |
void |
setAngularVelocity(Quaternion angularVelocity)
Set the angular velocity. |
void |
setMass(double mass)
Set the mass. |
void |
setMassAcceleration(double massAcceleration)
Set the mass velocity rate of change. |
void |
setMassVelocity(double massVelocity)
Set the mass rate of change. |
void |
setMomentOfInertia(double[] momentOfInertia)
Set the moment of inertia. |
void |
setOrientation(Quaternion orientation)
Set the orientation. |
void |
setPosition(Vector position)
Set the position. |
void |
setVelocity(Vector velocity)
Set the velocity. |
String |
toString()
Return a string representation of this object. |
void |
zeroAcceleration()
Zero the acceleration. |
void |
zeroAngularAcceleration()
Zero the angular acceleration. |
void |
zeroAngularMotion()
Zero all angular motion. |
void |
zeroMassAcceleration()
Zero the mass acceleration. |
void |
zeroMotion()
Zero all motion. |
void |
zeroTranslationalMotion()
Zero all translational motion. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicState()
| Method Detail |
|---|
public void addAcceleration(Vector acceleration)
addAcceleration in interface IDynamicStateacceleration - Acceleration vector in length time^-2 units.public void addAngularAcceleration(Quaternion acceleration)
addAngularAcceleration in interface IDynamicStateacceleration - Angular acceleration in radians time^-2 units.public void addMassAcceleration(double massAcceleration)
addMassAcceleration in interface IDynamicStatemassAcceleration - in mass time^-2 units.public void applyForce(Vector force)
applyForce in interface IDynamicStateforce - Force vector in world coordinates in mass length time^-2
units.
public void applyForce(Vector force,
Vector position)
applyForce in interface IDynamicStateforce - Force vector in world coordinates in mass length
time^-2 units.position - Position of applied force relative to the center of
mass in world coordinates in length units.
public void applyForceLocal(Vector force,
Vector position)
applyForceLocal in interface IDynamicStateforce - Force vector in local coordinates in mass length
time^-2 units.position - Position of applied force relative to the center of
mass in local coordinates in length units.public Object clone()
clone in interface IStateclone in class Objectpublic Vector convertLocalToWorld(Vector v)
convertLocalToWorld in interface IStatev - Vector in local coordinates.public Vector convertWorldToLocal(Vector v)
convertWorldToLocal in interface IStatev - Vector in local coordinates.public Vector getAcceleration()
getAcceleration in interface IDynamicStatepublic Quaternion getAngularAcceleration()
getAngularAcceleration in interface IDynamicStatepublic Quaternion getAngularVelocity()
getAngularVelocity in interface IDynamicStatepublic double getMass()
getMass in interface IDynamicStatepublic double getMassAcceleration()
getMassAcceleration in interface IDynamicStatepublic double getMassVelocity()
getMassVelocity in interface IDynamicStatepublic double[] getMomentOfInertia()
getMomentOfInertia in interface IDynamicStatepublic Quaternion getOrientation()
getOrientation in interface IStatepublic Vector getPosition()
getPosition in interface IStatepublic Vector getPreviousPosition()
getPreviousPosition in interface IStatepublic Vector getVelocity()
getVelocity in interface IDynamicStatepublic void move(Vector movement)
move in interface IStatepublic Vector orientLocalToWorld(Vector v)
orientLocalToWorld in interface IStatev - Vector in local coordinates.public Vector orientWorldToLocal(Vector v)
orientWorldToLocal in interface IStatev - Vector in world coordinates.public void rotate(Quaternion rotation)
rotate in interface IStatepublic void setAcceleration(Vector acceleration)
setAcceleration in interface IDynamicStateacceleration - Acceleration vector in length time^-2 units.public void setAngularAcceleration(Quaternion angularAcceleration)
setAngularAcceleration in interface IDynamicStateangularAcceleration - Angular acceleration in radians time^-2
units.public void setAngularVelocity(Quaternion angularVelocity)
setAngularVelocity in interface IDynamicStateangularVelocity - Angular velocity in radians time^-1 units.public void setMass(double mass)
setMass in interface IDynamicStatemass - Mass in mass units.public void setMassAcceleration(double massAcceleration)
setMassAcceleration in interface IDynamicStatemassAcceleration - Mass velocity rate of change in mass time^-2
units.public void setMassVelocity(double massVelocity)
setMassVelocity in interface IDynamicStatemassVelocity - Mass rate of change in mass time^-1 units.public void setMomentOfInertia(double[] momentOfInertia)
setMomentOfInertia in interface IDynamicStatemomentOfInertia - Moment of intertia in mass length^2 units.public void setOrientation(Quaternion orientation)
setOrientation in interface IStatepublic void setPosition(Vector position)
setPosition in interface IStatepublic void setVelocity(Vector velocity)
setVelocity in interface IDynamicStatevelocity - Velocity vector in length time^-1 units.public String toString()
toString in interface IDynamicStatetoString in class Objectpublic void zeroAcceleration()
zeroAcceleration in interface IDynamicStatepublic void zeroAngularAcceleration()
zeroAngularAcceleration in interface IDynamicStatepublic void zeroAngularMotion()
zeroAngularMotion in interface IDynamicStatepublic void zeroMassAcceleration()
zeroMassAcceleration in interface IDynamicStatepublic void zeroMotion()
zeroMotion in interface IDynamicStatepublic void zeroTranslationalMotion()
zeroTranslationalMotion in interface IDynamicState
protected void applyTorque(Vector force,
Vector position)
force - Force vector in local coordinates in mass length
time^-2 units.position - Position of applied force relative to the center of
mass in local coordinates in length units.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |