Regular API function

simInsertObjectIntoOctree / sim.insertObjectIntoOctree

Description Inserts an object into an OC tree, as voxels. Each voxel will store a color and a tag value. See also sim.subtractObjectFromOctree, sim.insertVoxelsIntoOctree and the other OC tree related functions.
C/C++
synopsis
simInt simInsertObjectIntoOctree(simInt octreeHandle,simInt objectHandle,simInt options,const simUChar* color,simUInt tag,simVoid* reserved)
C/C++
parameters
octreeHandle: the handle of the OC tree. See also sim.getObject
objectHandle: the handle of the object to insert. Only potentially collidable objects are supported
options: reserved. Set to 0
color: a pointer to one RGB triple, specifying the red, green and blue color components (0-255). Can be nullptr.
tag: a uint32 value, which is user-defined.
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.insertObjectIntoOctree(int octreeHandle,int objectHandle,int options,int[] color=nil,int tag=0)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int totalVoxelCnt=sim.insertObjectIntoOctree(int octreeHandle,int objectHandle,int options,list color=None,int tag=0)

<