
Regular API function
simSetShapeInertia / sim.setShapeInertia
Description
|
Applies a new inertia matrix 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/C++ synopsis
|
int simSetShapeInertia(int shapeHandle,const double* inertiaMatrix,const double* transformationMatrix) |
C/C++ parameters |
inertiaMatrix: the new inertia matrix (9 values), expressed relative to transformationMatrix (itself expressed relative to the shape's reference frame)
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/C++ return value
|
-1 in case of an error
|
Lua synopsis
|
sim.setShapeInertia(int shapeHandle,float[9] inertiaMatrix,float[12] transformationMatrix) |
Lua parameters |
Similar to the C-function counterpart
|
Lua return values
|
|
Python synopsis |
sim.setShapeInertia(int shapeHandle,list inertiaMatrix,list transformationMatrix) |
|