Create a octree structure
maximum capacity for each block node
before it's been subdivided, might be exceeded if maxDepth
is reached
maximum depth of this tree
Add an entry to this tree. Should be called after build
.
the new entry
Build this octree from given entries. Root Boundary is the bounding box of all the entries.
a collection of entries to be queried later
Specialized selection for frustums
the selecting frustum
the resulting set of entries
Remove an entry from this tree. Should be called after build
.
the entry to be removed
Select all the entries overlapping the given primitive
the selecting primitive
the resulting set of entries
Create sub blocks and populate them with given entries
min position of the parent bounding box
max position of the parent bounding box
the entries to be inserted
maximum capacity for each block node
before it's been subdivided, might be exceeded if maxDepth
is reached
depth before subdivided
maximum depth of this tree
a function takes an entry and returns its primitive info
the sub blocks
Generated using TypeDoc
An octree acceleration data structure
let octree = new Octree(); octree.build(models, model => { return model._boundingShape; }); octree.select(enums.SHAPE_FRUSTUM, view._frustum);