com.bulletphysics.dynamics
Class RigidBodyConstructionInfo

java.lang.Object
  extended by com.bulletphysics.dynamics.RigidBodyConstructionInfo

public class RigidBodyConstructionInfo
extends Object

RigidBodyConstructionInfo provides information to create a rigid body.

Setting mass to zero creates a fixed (non-dynamic) rigid body. For dynamic objects, you can use the collision shape to approximate the local inertia tensor, otherwise use the zero vector (default argument).

You can use MotionState to synchronize the world transform between physics and graphics objects. And if the motion state is provided, the rigid body will initialize its initial world transform from the motion state, startWorldTransform is only used when you don't provide a motion state.


Field Summary
 float additionalAngularDampingFactor
           
 float additionalAngularDampingThresholdSqr
           
 boolean additionalDamping
          Additional damping can help avoiding lowpass jitter motion, help stability for ragdolls etc.
 float additionalDampingFactor
           
 float additionalLinearDampingThresholdSqr
           
 float angularDamping
           
 float angularSleepingThreshold
           
 CollisionShape collisionShape
           
 float friction
          Best simulation results when friction is non-zero.
 float linearDamping
           
 float linearSleepingThreshold
           
 Vector3f localInertia
           
 float mass
           
 MotionState motionState
          When a motionState is provided, the rigid body will initialize its world transform from the motion state.
 float restitution
          Best simulation results using zero restitution.
 Transform startWorldTransform
           
 
Constructor Summary
RigidBodyConstructionInfo(float mass, MotionState motionState, CollisionShape collisionShape)
           
RigidBodyConstructionInfo(float mass, MotionState motionState, CollisionShape collisionShape, Vector3f localInertia)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mass

public float mass

motionState

public MotionState motionState
When a motionState is provided, the rigid body will initialize its world transform from the motion state. In this case, startWorldTransform is ignored.


startWorldTransform

public final Transform startWorldTransform

collisionShape

public CollisionShape collisionShape

localInertia

public final Vector3f localInertia

linearDamping

public float linearDamping

angularDamping

public float angularDamping

friction

public float friction
Best simulation results when friction is non-zero.


restitution

public float restitution
Best simulation results using zero restitution.


linearSleepingThreshold

public float linearSleepingThreshold

angularSleepingThreshold

public float angularSleepingThreshold

additionalDamping

public boolean additionalDamping
Additional damping can help avoiding lowpass jitter motion, help stability for ragdolls etc. Such damping is undesirable, so once the overall simulation quality of the rigid body dynamics system has improved, this should become obsolete.


additionalDampingFactor

public float additionalDampingFactor

additionalLinearDampingThresholdSqr

public float additionalLinearDampingThresholdSqr

additionalAngularDampingThresholdSqr

public float additionalAngularDampingThresholdSqr

additionalAngularDampingFactor

public float additionalAngularDampingFactor
Constructor Detail

RigidBodyConstructionInfo

public RigidBodyConstructionInfo(float mass,
                                 MotionState motionState,
                                 CollisionShape collisionShape)

RigidBodyConstructionInfo

public RigidBodyConstructionInfo(float mass,
                                 MotionState motionState,
                                 CollisionShape collisionShape,
                                 Vector3f localInertia)