Regular API function

simCheckOctreePointOccupancy

Description Checks whether the provided points collide with the octree voxels. See also simInsertVoxelsIntoOctree and the other octree related functions.
C synopsis simInt checkOctreePointOccupancy(simInt octreeHandle,simInt options,const simFloat* pts,simInt ptCnt,simUInt* tag,simUInt64* location,simVoid* reserved)
C parameters
octreeHandle: the handle of the octree. See also simGetObjectHandle
options: bit-coded:
bit0 set (1): specified points are relative to the octree reference frame, otherwise they are relative to the world reference frame
pts: a pointer to the points specified as X/Y/Z coordinates
ptCnt: the number of points contained in pts
tag: a pointer to a tag value, receiving the tag value of the voxel that collides with a single point. If several points are tested, then this pointer is ignored. Can be NULL.
location: a pointer to a uint64 value, which specifies the location of the voxel that collides with a single point. If several points are tested, then this pointer is ignored. Can be NULL. The location value is coded in following way:
bit0 - bit5: the depth level of the voxel in the octree structure (1-63).
bit6 - bit63: a triple bit-value for each depth level. triple bit-values represent the node location relative to the parent node:
0: (-1,-1,-1)
1: (+1,-1,-1)
2: (-1,+1,-1)
3: (+1,+1,-1)
4: (-1,-1,+1)
5: (+1,-1,+1)
6: (-1,+1,+1)
7: (+1,+1,+1)
as an example, 0xE02 would indicate a depth level 2, with coordinates: (+1,+1,+1)*voxelSize*2+(-1,-1,-1)*voxelSize.
reserved: reserved for future extensions. Set to NULL
C return value
-1 if operation was not successful, 0 if the points do not collide with the voxels, 1 if the points collide with the voxels
Lua synopsis number result,number tag,number locationLow,number locationHigh=simCheckOctreePointOccupancy(number octreeHandle,number options,table points)
Lua parameters
Same as C-function
Lua return values
if a single point is specified and collides with a voxel, 4 values are returned, otherwise only result will be returned. The location value is divided into a low- and high-value (i.e. first 32 bits and last 32 bits of location).

All regular API functions on one page