Regular API function

simGetShapeInertia / sim.getShapeInertia

Description Retrieves the inertia information from a shape. See also sim.setShapeInertia, sim.getShapeMass and sim.computeMassAndInertia.
C synopsis simInt simGetShapeInertia(simInt shapeHandle,simFloat* inertiaMatrix,simFloat* transformationMatrix)
C parameters
shapeHandle: handle of the shape object
inertiaMatrix (output): the inertia matrix or tensor (9 values), expressed relative to transformationMatrix (which coincides with the center of mass). The matrix is diagonal, i.e. contains the principal moments of inertia.
transformationMatrix (output): a transformation matrix (12 values) expressed relative to the shape's reference frame. The matrix indicates the center of mass of the shape, and is the frame relative to which inertiaMatrix is expressed.
C return value
-1 in case of an error
Lua synopsis table[9] inertiaMatrix,table[12] transformationMatrix=sim.getShapeInertia(int shapeHandle)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart