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 primitive shape. Undefined if the shape is a compound shape or not primitive.
floatData[1]: Y-size of the primitive shape. Undefined if the shape is a compound shape or not primitive.
floatData[2]: Z-size or height of the primitive shape. Undefined if the shape is a compound shape or not primitive.
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 primitive
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 a primitive
bit2 set (4): shape is convex
pureType: the primitive 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 primitive shape. Undefined if the shape is a compound shape or not primitive.
dimensions[2]: Y-size of the primitive shape. Undefined if the shape is a compound shape or not primitive.
dimensions[3]: Z-size or height of the primitive shape. Undefined if the shape is a compound shape or not primitive.
dimensions[4]: Inside scaling. Undefined if the shape is a compound shape or not primitive.
Python
synopsis
int result,int pureType,list dimensions=sim.getShapeGeomInfo(int shapeHandle)