Regular API function

simSetShapeMassAndInertia

Description Applies mass and inertia information to a shape. If simulation is running, the shape will be dynamically reset (similar to calling simResetDynamicObject right after). See also simGetShapeMassAndInertia, simGetObjectMatrix and simBuildMatrix.
C synopsis simInt simSetShapeMassAndInertia(simInt shapeHandle,simFloat mass,const simFloat* inertiaMatrix,const simFloat* centerOfMass,const simFloat* transformation)
C parameters
shapeHandle: handle of the shape object
mass: the new mass of the object
inertia matrix: the new inertia matrix or tensor (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 NULL, in which case the data is relative to the absolute reference frame. See here to see how matrix transformations are specified in V-REP.
C return value
-1 in case of an error
Lua synopsis number result=simSetShapeMassAndInertia(number shapeHandle,number mass,table_9 inertiaMatrix,table_3 centerOfMass,table_12 transformation=nil)
Lua parameters
See the C-function for details
Lua return values
See the C-function for details

All regular API functions on one page