Regular API function

simSetShapeInertia / sim.setShapeInertia

Description Applies a new inertia tensor to a shape. If simulation is running, the shape will be dynamically reset (similar to calling sim.resetDynamicObject right after). See also sim.getShapeInertia, sim.setShapeMass and sim.computeMassAndInertia.
C synopsis simInt simSetShapeInertia(simInt shapeHandle,const simFloat* inertiaMatrix,const simFloat* transformationMatrix)
C parameters
shapeHandle: handle of the shape object
inertiaMatrix: the new inertia matrix or tensor (9 values), expressed relative to transformationMatrix (which should coincide with the center of mass). The matrix should be symmetric.
transformationMatrix: 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 sim.setShapeInertia(int shapeHandle,table[9] inertiaMatrix,table[12] transformationMatrix)
Lua parameters
Similar to the C-function counterpart
Lua return values