QuadTree <TItem>
Index
Constructors
constructor
Type parameters
- TItem: QuadTreeItem
Parameters
bounds: BoundingBox
optionaloptions: QuadTreeOptions
Returns QuadTree<TItem>
Properties
publicbottomLeft
publicbottomRight
publicbounds
publichalfHeight
publichalfWidth
publicitems
publicoptionaloptions
publictopLeft
publictopRight
Methods
clear
Returns void
debug
Parameters
Returns void
getAllItems
Returns TItem[]
getTreeDepth
Returns number
insert
Insert an item to be tracked in the QuadTree
Parameters
item: TItem
Returns void
query
Query the structure for all objects that intersect the bounding box
Parameters
boundingBox: BoundingBox
Returns TItem[]
items
remove
Remove a tracked item in the QuadTree
Parameters
item: TItem
Returns void
QuadTree spatial data structure. Useful for quickly retrieving all objects that might be in a specific location.