simComputeMassAndInertia

Computes and applies the mass and inertia matrix for a shape, based on its convex representation. When calling this function while the simulation is running, one should then call sim.resetDynamicObject, for the changes to take effect

C++ synopsis

int simComputeMassAndInertia(int shapeHandle, double density))

Arguments

  • shapeHandle: handle of shape
  • density: the density expressed in kg/m^3

Return

  • -1 in case of an error, 0 if the shape is not convex, otherwise 1.


See also: