simInsertObjectIntoOctree

Inserts an object into an OC tree, as voxels. Each voxel will store a color and a tag value

C++ synopsis

int simInsertObjectIntoOctree(int octreeHandle, int objectHandle, int options, const unsigned char* color, unsigned int tag, void* reserved)

Arguments

  • octreeHandle: handle of the OC tree
  • objectHandle: handle of the object to insert. Only potentially collidable objects are supported
  • options: reserved. Set to 0
  • color: pointer to one RGB triple, specifying the red, green and blue color components (0-255). Can be nullptr.
  • tag: uint32 value, which is user-defined.
  • reserved: reserved for future extensions. Set to nullptr

Return

  • -1 if operation was not successful, otherwise the total number of voxels in the OC tree


See also: