Regular API function

simInsertPointsIntoPointCloud

Description Inserts points into a point cloud. See also simRemovePointsFromPointCloud and the other point cloud related functions.
C synopsis simInt simInsertPointsIntoPointCloud(simInt pointCloudHandle,simInt options,const simFloat* pts,simInt ptCnt,const simUChar* color,simVoid* reserved)
C parameters
pointCloudHandle: the handle of the point cloud. See also simGetObjectHandle
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 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=simInsertPointsIntoPointCloud(number pointCloudHandle,number options,table points,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