Regular API function

simGetShapeMassAndInertia / sim.getShapeMassAndInertia

Description DEPRECATED. Use sim.getShapeMass and sim.getShapeInertia instead.
C synopsis simInt simGetShapeMassAndInertia(simInt shapeHandle,simFloat* mass,simFloat* inertiaMatrix,simFloat* centerOfMass,const simFloat* transformation)
C parameters
shapeHandle: handle of the shape object
mass: the mass of the object
inertia matrix (output): the inertia matrix or tensor (9 values), expressed relative to the center of mass. The returned matrix is relative to the orientational frame of transformation (see further below).
centerOfMass (output): the position of the center of mass, relative to the specified transformation (see next item).
transformation: the transformation matrix (12 values) relative to which we want the data. Can be nullptr, in which case the returned data is relative to the absolute reference frame. See here to see how matrix transformations are specified in CoppeliaSim.
C return value
-1 in case of an error
Lua synopsis float mass,table[9] inertiaMatrix,table[3] centerOfMass=sim.getShapeMassAndInertia(int shapeHandle,table[12] transformation=nil)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart