sim.computeMassAndInertia

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

Synopsis

int result = sim.computeMassAndInertia(int shapeHandle, float density) int result = sim.computeMassAndInertia(int shapeHandle, float density)

Arguments

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

Return values

  • result: 0 if the shape is not convex, otherwise 1


See also: