pub unsafe extern "C" fn PxRigidBodyExt_updateMassAndInertia(
    body: *mut PxRigidBody,
    shapeDensities: *const f32,
    shapeDensityCount: u32,
    massLocalPose: *const PxVec3,
    includeNonSimShapes: bool
) -> bool
Expand description

Computation of mass properties for a rigid body actor

To simulate a dynamic rigid actor, the SDK needs a mass and an inertia tensor.

This method offers functionality to compute the necessary mass and inertia properties based on the shapes declared in the PxRigidBody descriptor and some additionally specified parameters. For each shape, the shape geometry, the shape positioning within the actor and the specified shape density are used to compute the body’s mass and inertia properties.

Shapes without PxShapeFlag::eSIMULATION_SHAPE set are ignored unless includeNonSimShapes is true. Shapes with plane, triangle mesh or heightfield geometry and PxShapeFlag::eSIMULATION_SHAPE set are not allowed for PxRigidBody collision.

This method will set the mass, center of mass, and inertia tensor

if no collision shapes are found, the inertia tensor is set to (1,1,1) and the mass to 1

if massLocalPose is non-NULL, the rigid body’s center of mass parameter will be set to the user provided value (massLocalPose) and the inertia tensor will be resolved at that point.

If all shapes of the actor have the same density then the overloaded method updateMassAndInertia() with a single density parameter can be used instead.

Boolean. True on success else false.