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 synopsis simInt simInsertObjectIntoPointCloud(simInt pointCloudHandle,simInt objectHandle,simInt options,simFloat gridSize,const simUChar* color,simVoid* reserved)
C parameters
pointCloudHandle: the handle of the point cloud. See also simGetObjectHandle
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 NULL.
optionalValues: can be used to specify additional parameters, or set to NULL 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 return value
-1 if operation was not successful, otherwise the total number of points in the point cloud
Lua synopsis number totalPointCnt=sim.insertObjectIntoPointCloud(number pointCloudHandle,number objectHandle,number options,number gridSize,table color=nil,number duplicateTolerance=nil)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page