Regular API function

simInsertPointsIntoPointCloud / sim.insertPointsIntoPointCloud

Description Inserts points into a point cloud. See also sim.removePointsFromPointCloud and the other point cloud related functions.
C/C++
synopsis
simInt simInsertPointsIntoPointCloud(simInt pointCloudHandle,simInt options,const simFloat* pts,simInt ptCnt,const simUChar* color,simVoid* reserved)
C/C++
parameters
pointCloudHandle: the handle of the point cloud. See also sim.getObject
options: bit-coded:
bit0 set (1): specified points are relative to the point cloud reference frame, otherwise they are relative to the world reference frame
bit1 set (2): the color array contains one RGB triple per point. Otherwise it contains a single RGB triple
pts: a pointer to the point positions specified as X/Y/Z coordinates
ptCnt: the number of point coordinates contained in pts
color: a pointer to one or several RGB triples, 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.insertPointsIntoPointCloud(int pointCloudHandle,int options,float[] points,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.insertPointsIntoPointCloud(int pointCloudHandle,int options,list points,list color=None,float duplicateTolerance=None)