Regular API function

simGetShapeGeomInfo / sim.getShapeGeomInfo

Description Retrieves geometric information related to a shape. See also sim.getShapeMesh.
C/C++
synopsis
simInt simGetShapeGeomInfo(simInt shapeHandle,simInt* intData,simFloat* floatData,simVoid* reserved)
C/C++
parameters
shapeHandle: handle of the shape. See also sim.getObject.
intData (output): pointer to 5 integer values:
intData[0]: the primitive type of the shape. Undefined if the shape is a compound shape.
floatData (output): pointer to 5 float values:
floatData[0]: X-size or diameter of the pure shape. Undefined if the shape is a compound shape or not pure.
floatData[1]: Y-size of the pure shape. Undefined if the shape is a compound shape or not pure.
floatData[2]: Z-size or height of the pure shape. Undefined if the shape is a compound shape or not pure.
floatData[3]: Reserved.
reserved: reserved for future extensions. Set to nullptr.
C/C++
return value
-1 in case of an error, otherwise bit-coded:
bit0 set (1): shape is a compound shape
bit1 set (2): shape is pure
bit2 set (4): shape is convex
Lua
synopsis
int result,int pureType,float[4] dimensions=sim.getShapeGeomInfo(int shapeHandle)
Lua
parameters
shapeHandle: handle of the shape. See also sim.getObject.
Lua
return values
result: bit-coded:
bit0 set (1): shape is a compound shape
bit1 set (2): shape is pure
bit2 set (4): shape is convex
pureType: the pure type of the shape. Undefined if the shape is a compound shape.
dimensions: table to 4 values giving information about the shape's dimensions:
dimensions[1]: X-size or diameter of the pure shape. Undefined if the shape is a compound shape or not pure.
dimensions[2]: Y-size of the pure shape. Undefined if the shape is a compound shape or not pure.
dimensions[3]: Z-size or height of the pure shape. Undefined if the shape is a compound shape or not pure.
dimensions[4]: Inside scaling. Undefined if the shape is a compound shape or not pure.
Python
synopsis
int result,int pureType,list dimensions=sim.getShapeGeomInfo(int shapeHandle)