Regular API function


Description Computes and applies the mass and inertia properties for a convex shape (or convex compound shape), based on a density value. If call this function while the simulation is running, you will have to call simResetDynamicObject upon the object, for the changes to take effect. See also simGetShapeMassAndInertia and simConvexDecompose.
C synopsis simInt simComputeMassAndInertia(simInt shapeHandle,simFloat density))
C parameters
shapeHandle: handle of shape. The shape must be convex (or a convex compound).
density: the density expressed in kg/m^3
C return value
-1 in case of an error, 0 if the shape is not convex, otherwise 1.
Lua synopsis number result=simComputeMassAndInertia(number shapeHandle,number density)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page