Module building_blocks_storage::octree [−][src]
Expand description
This module contains octrees in various forms. The most fundamental of these is the OctreeSet
, which is used to implement
everything else. Because the OctreeSet
has a bounded domain, it is extended to being unbounded by storing multiple
OctreeSets
in a hash map. This is known as the ChunkOctreeSet
.
While each octree is a set of Point3i
s, they can also be used as sets of ChunkKey3
s. After all, ChunkKey
s are just
Point
s at a different scale. The OctreeChunkIndex
satisfies this use case; it can be used to index an unbounded set of
chunks, which makes it a nice companion for the ChunkMap3
. It can also be used as a clipmap for level of detail.
Re-exports
Modules
OctreeChunkIndex
is “unbounded” because it is actually a collection of OctreeSet
s stored in a map. Each entry of that
map is called a “super chunk.” You can think if it like a ChunkMap
, except instead of Array
s, it stores OctreeSet
s.
Every superchunk is the same shape, and each is resonsible for a sparse set of chunks in a bounded region.
The OctreeSet
type is a memory-efficient set of points organized hierarchically. Often referred to as a “hashed octree.”