|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bulletphysics.collision.dispatch.CollisionObject
com.bulletphysics.dynamics.RigidBody
public class RigidBody
RigidBody is the main class for rigid body objects. It is derived from
CollisionObject, so it keeps reference to CollisionShape.
It is recommended for performance and memory use to share CollisionShape
objects whenever possible.
There are 3 types of rigid bodies:
Deactivated (sleeping) rigid bodies don't take any processing time, except a minor broadphase collision detection impact (to allow active objects to activate/wake up sleeping objects).
| Field Summary | |
|---|---|
int |
contactSolverType
|
int |
debugBodyId
|
int |
frictionSolverType
|
| Fields inherited from class com.bulletphysics.collision.dispatch.CollisionObject |
|---|
ACTIVE_TAG, DISABLE_DEACTIVATION, DISABLE_SIMULATION, ISLAND_SLEEPING, WANTS_DEACTIVATION |
| Constructor Summary | |
|---|---|
RigidBody(float mass,
MotionState motionState,
CollisionShape collisionShape)
|
|
RigidBody(float mass,
MotionState motionState,
CollisionShape collisionShape,
Vector3f localInertia)
|
|
RigidBody(RigidBodyConstructionInfo constructionInfo)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int contactSolverType
public int frictionSolverType
public int debugBodyId
| Constructor Detail |
|---|
public RigidBody(RigidBodyConstructionInfo constructionInfo)
public RigidBody(float mass,
MotionState motionState,
CollisionShape collisionShape)
public RigidBody(float mass,
MotionState motionState,
CollisionShape collisionShape,
Vector3f localInertia)
| Method Detail |
|---|
public void destroy()
public void proceedToTransform(Transform newTrans)
public static RigidBody upcast(CollisionObject colObj)
public void predictIntegratedTransform(float timeStep,
Transform predictedTransform)
public void saveKinematicState(float timeStep)
public void applyGravity()
public void setGravity(Vector3f acceleration)
public Vector3f getGravity(Vector3f out)
public void setDamping(float lin_damping,
float ang_damping)
public float getLinearDamping()
public float getAngularDamping()
public float getLinearSleepingThreshold()
public float getAngularSleepingThreshold()
public void applyDamping(float timeStep)
public void setMassProps(float mass,
Vector3f inertia)
public float getInvMass()
public Matrix3f getInvInertiaTensorWorld(Matrix3f out)
public void integrateVelocities(float step)
public void setCenterOfMassTransform(Transform xform)
public void applyCentralForce(Vector3f force)
public Vector3f getInvInertiaDiagLocal(Vector3f out)
public void setInvInertiaDiagLocal(Vector3f diagInvInertia)
public void setSleepingThresholds(float linear,
float angular)
public void applyTorque(Vector3f torque)
public void applyForce(Vector3f force,
Vector3f rel_pos)
public void applyCentralImpulse(Vector3f impulse)
public void applyTorqueImpulse(Vector3f torque)
public void applyImpulse(Vector3f impulse,
Vector3f rel_pos)
public void internalApplyImpulse(Vector3f linearComponent,
Vector3f angularComponent,
float impulseMagnitude)
public void clearForces()
public void updateInertiaTensor()
public Vector3f getCenterOfMassPosition(Vector3f out)
public Quat4f getOrientation(Quat4f out)
public Transform getCenterOfMassTransform(Transform out)
public Vector3f getLinearVelocity(Vector3f out)
public Vector3f getAngularVelocity(Vector3f out)
public void setLinearVelocity(Vector3f lin_vel)
public void setAngularVelocity(Vector3f ang_vel)
public Vector3f getVelocityInLocalPoint(Vector3f rel_pos,
Vector3f out)
public void translate(Vector3f v)
public void getAabb(Vector3f aabbMin,
Vector3f aabbMax)
public float computeImpulseDenominator(Vector3f pos,
Vector3f normal)
public float computeAngularImpulseDenominator(Vector3f axis)
public void updateDeactivation(float timeStep)
public boolean wantsSleeping()
public BroadphaseProxy getBroadphaseProxy()
public void setNewBroadphaseProxy(BroadphaseProxy broadphaseProxy)
public MotionState getMotionState()
public void setMotionState(MotionState motionState)
public void setAngularFactor(float angFac)
public float getAngularFactor()
public boolean isInWorld()
public boolean checkCollideWithOverride(CollisionObject co)
checkCollideWithOverride in class CollisionObjectpublic void addConstraintRef(TypedConstraint c)
public void removeConstraintRef(TypedConstraint c)
public TypedConstraint getConstraintRef(int index)
public int getNumConstraintRefs()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||