Regular API function

simInsertVoxelsIntoOctree / sim.insertVoxelsIntoOctree

Description Inserts voxels into an OC tree. Each voxel will store a color and a tag value. See also sim.removeVoxelsFromOctree and the other OC tree related functions.
C/C++
synopsis
simInt simInsertVoxelsIntoOctree(simInt octreeHandle,simInt options,const simFloat* pts,simInt ptCnt,const simUChar* color,const simUInt* tag,simVoid* reserved)
C/C++
parameters
octreeHandle: the handle of the OC tree. See also sim.getObject
options: bit-coded:
bit0 set (1): specified points are relative to the OC tree reference frame, otherwise they are relative to the world reference frame
bit1 set (2): the color array contains one RGB triple per point, and the tag array contains one value per point. Otherwise it the color array contains a single RGB triple, and the tag array contains a single value.
pts: a pointer to the voxel 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.
tag: a pointer to one or several uint32 values, which are user-defined values. Can be nullptr, and should be nullptr if color is nullptr.
reserved: reserved for future extensions. Set to nullptr
C/C++
return value
-1 if operation was not successful, otherwise the total number of voxels in the OC tree
Lua
synopsis
int totalVoxelCnt=sim.insertVoxelsIntoOctree(int octreeHandle,int options,float[] points,int[] color=nil,int[] tag=nil)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int totalVoxelCnt=sim.insertVoxelsIntoOctree(int octreeHandle,int options,list points,list color=None,list tag=None)

<