Calculates an offset index from octant key coordinates.
The index identifies the octant's positional offset relative to its parent:
0: [0, 0, 0] 1: [0, 0, 1] 2: [0, 1, 0] 3: [0, 1, 1] 4: [1, 0, 0] 5: [1, 0, 1] 6: [1, 1, 0] 7: [1, 1, 1] Copy
0: [0, 0, 0] 1: [0, 0, 1] 2: [0, 1, 0] 3: [0, 1, 1] 4: [1, 0, 0] 5: [1, 0, 1] 6: [1, 1, 0] 7: [1, 1, 1]
Note: This binary layout is defined in the external module sparse-octree.
sparse-octree
For more information on fast bitwise modulo with power of two divisors see: https://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionEasy
The X-coordinate of the octant key.
The Y-coordinate of the octant key.
The Z-coordinate of the octant key.
The index of the relative positional offset. Range: [0, 7].
Calculates an offset index from octant key coordinates.
The index identifies the octant's positional offset relative to its parent:
Note: This binary layout is defined in the external module
sparse-octree
.For more information on fast bitwise modulo with power of two divisors see: https://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionEasy