The numeric boundaries of this node.
The level of this node.
Total max nesting levels of the root Quadtree node.
Max objects this node can hold before it splits.
Subnodes of this node
Array of objects in this node.
Clear the Quadtree.
Insert an object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.
Object to be added.
The opposite of a split: try to merge and dissolve subnodes.
The objects from this node and all subnodes combined.
Remove an object from the tree.
If you have to remove many objects, consider clearing the entire tree and rebuilding it or use the fast
flag to cleanup after the last removal.
Object to be removed.
Set to true to increase performance temporarily by preventing cleanup of empty subnodes (optional, default: false).
Weather or not the object was removed from THIS node (no recursive check).
Split the node into 4 subnodes.
Update an object already in the tree (shorthand for remove and insert).
If you have to update many objects, consider clearing and rebuilding the
entire tree or use the fast
flag to cleanup after the last update.
Object to be updated.
Set to true to increase performance temporarily by preventing cleanup of empty subnodes (optional, default: false).
Generated using TypeDoc
Class representing a Quadtree node.
Typescript: If you like to be explicit, you optionally can pass in a generic type for objects to be stored in the Quadtree: