Regular API function

simInsertObjectIntoPointCloud / sim.insertObjectIntoPointCloud

Description Inserts an object into a point cloud, as points. See also sim.insertPointsIntoPointCloud and the other point cloud related functions.
C/C++
synopsis
simInt simInsertObjectIntoPointCloud(simInt pointCloudHandle,simInt objectHandle,simInt options,simFloat gridSize,const simUChar* color,simVoid* reserved)
C/C++
parameters
pointCloudHandle: the handle of the point cloud. See also sim.getObject
objectHandle: the handle of the object to insert. Only potentially collidable objects are supported
options: reserved. Set to 0
gridSize: when a shape is inserted, it will first be converted to an OC tree with a given grid or voxel size.
color: a pointer to one RGB triple, specifying the red, green and blue color components (0-255). Can be nullptr.
optionalValues: can be used to specify additional parameters, or set to nullptr for default parameter values:
((simInt*)optionalValues)[0]: an integer value that is bit coded. Each bit indicates which additional parameter will be taken into account:
((simFloat*)optionalValues)[1]: duplicateTolerance: a minimum distance tolerance value that is used to avoid duplicate points. To have this parameter taken into account, set bit0 to 1 in ((simInt*)optionalValues)[0]. Point insertion is slower when the duplicate tolerance is > then 0.0
C/C++
return value
-1 if operation was not successful, otherwise the total number of points in the point cloud
Lua
synopsis
int totalPointCnt=sim.insertObjectIntoPointCloud(int pointCloudHandle,int objectHandle,int options,float gridSize,int[] color=nil,float duplicateTolerance=nil)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int totalPointCnt=sim.insertObjectIntoPointCloud(int pointCloudHandle,int objectHandle,int options,float gridSize,list color=None,float duplicateTolerance=None)