net.sf.j3d.physics
Class RigidBody.State
java.lang.Object
net.sf.j3d.physics.RigidBody.State
- Enclosing interface:
- RigidBody
public static class RigidBody.State
- extends Object
|
Method Summary |
void |
addUpdateListener(UpdateListener l)
|
void |
angularImpulse(Vector impulse)
|
Vector |
getAngularMomentum()
|
Vector |
getAngularVelocity()
|
Vector |
getForce()
|
TransformMatrix |
getInertia()
|
Vector |
getLinearMomentum()
|
Vector |
getLinearVelocity()
|
Vector |
getLocation()
|
double |
getMass()
|
double |
getRestitution()
|
Vector |
getRotation()
|
Vector |
getTorque()
|
void |
init(Vector x,
Vector r,
Vector v,
Vector w,
Vector f,
Vector t,
double mass,
TransformMatrix inertia,
double e)
Initializes this RigidBody object with the specified location, rotation,
linear and angular velocity, force, and torque. |
void |
linearImpulse(Vector impulse)
|
void |
setAngularVelocity(Vector w)
|
void |
setForce(Vector f)
|
void |
setLinearVelocity(Vector v)
|
void |
setLocation(Vector x)
|
void |
setMass(double mass)
|
void |
setRotation(Vector r)
|
void |
setTorque(Vector t)
|
String |
toString()
|
void |
update(double time)
Updates the state variables stored by this RigidBody object for the given time step. |
RigidBody.State
public RigidBody.State()
init
public void init(Vector x,
Vector r,
Vector v,
Vector w,
Vector f,
Vector t,
double mass,
TransformMatrix inertia,
double e)
- Initializes this RigidBody object with the specified location, rotation,
linear and angular velocity, force, and torque.
- Parameters:
x - locationr - rotationv - linear velocityw - angular velocityf - forcet - torquemass - total mass of the simulated rigid bodyinertia - moment of inertia matrixe - coefficient of restitution
update
public void update(double time)
- Updates the state variables stored by this RigidBody object for the given time step.
- Parameters:
time - Time increment
linearImpulse
public void linearImpulse(Vector impulse)
angularImpulse
public void angularImpulse(Vector impulse)
addUpdateListener
public void addUpdateListener(UpdateListener l)
setMass
public void setMass(double mass)
getMass
public double getMass()
getRestitution
public double getRestitution()
getInertia
public TransformMatrix getInertia()
setLocation
public void setLocation(Vector x)
setRotation
public void setRotation(Vector r)
setLinearVelocity
public void setLinearVelocity(Vector v)
setAngularVelocity
public void setAngularVelocity(Vector w)
setForce
public void setForce(Vector f)
setTorque
public void setTorque(Vector t)
getLocation
public Vector getLocation()
getRotation
public Vector getRotation()
getLinearMomentum
public Vector getLinearMomentum()
getAngularMomentum
public Vector getAngularMomentum()
getLinearVelocity
public Vector getLinearVelocity()
getAngularVelocity
public Vector getAngularVelocity()
getForce
public Vector getForce()
getTorque
public Vector getTorque()
toString
public String toString()
- Overrides:
toString in class Object