Regular API function

simSetShapeMassAndInertia / sim.setShapeMassAndInertia

Description Deprecated. Use sim.setShapeMass and sim.setShapeInertia instead.
C/C++
synopsis
int simSetShapeMassAndInertia(int shapeHandle,double mass,const double* inertiaMatrix,const double* centerOfMass,const double* transformation)
C/C++
parameters
shapeHandle: handle of the shape object
mass: the new mass of the object
inertia matrix: the new inertia matrix (9 values), expressed relative to the center of mass. The matrix should be relative to the orientational frame of transformation (see further below).
centerOfMass: the new position of the center of mass, relative to the specified transformation (see next item).
transformation: the transformation matrix (12 values) relative to which we specify the data. Can be nullptr, in which case the data is relative to the absolute reference frame. See here to see how matrix transformations are specified in CoppeliaSim.
C/C++
return value
-1 in case of an error
Lua
synopsis
sim.setShapeMassAndInertia(int shapeHandle,float mass,float[9] inertiaMatrix,float[3] centerOfMass,float[12] transformation=nil)
Lua
parameters
Similar to the C-function counterpart
Lua
return values