public class RigidBodyConstructionInfo extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
RigidBodyConstructionInfo(float mass,
MotionState motionState,
CollisionShape collisionShape) |
RigidBodyConstructionInfo(float mass,
MotionState motionState,
CollisionShape collisionShape,
Vector3f localInertia) |
public float mass
public MotionState motionState
public final Transform startWorldTransform
public CollisionShape collisionShape
public final Vector3f localInertia
public float linearDamping
public float angularDamping
public float friction
public float restitution
public float linearSleepingThreshold
public float angularSleepingThreshold
public boolean additionalDamping
public float additionalDampingFactor
public float additionalLinearDampingThresholdSqr
public float additionalAngularDampingThresholdSqr
public float additionalAngularDampingFactor
public RigidBodyConstructionInfo(float mass,
MotionState motionState,
CollisionShape collisionShape)
public RigidBodyConstructionInfo(float mass,
MotionState motionState,
CollisionShape collisionShape,
Vector3f localInertia)