Home /Modules/spatial/SLOctree.md

SLOctree.md

lib/spatial/SLOctree.md · 35 line(s) · markdown

SLOctree

SLOctree is a sparse point-region octree over an integer cube [0, size)³, where size is rounded up to a power of two so the cube halves cleanly down to unit cells. Each node covers an axis-aligned cube and is either a leaf (at most one point payload) or has up to eight children, one per octant. insert descends and subdivides only along the path to the inserted point, so empty space costs nothing, and every scan prunes whole subtrees that are empty or do not overlap the query. Suited to sparse volumes, point clouds, region/frustum queries, and ray traversal.

A node is both the tree handle and a subtree root. Empty octants are null and are skipped during traversal.

Operations

Example

See SLOctreeBasic.