get (): boolean True if this node is a leaf node.
()
=> void Splits the node, but doesn't redistribute objects
()
=> void Tries to merge and collapse nodes which are no longer overpopulated.
(rect: Rect)
=>
Parsing error with FirstLiteralToken
|
Parsing error with FirstLiteralToken
|
Parsing error with FirstLiteralToken
|
Parsing error with PrefixUnaryExpression
|
Parsing error with FirstLiteralToken
Returns the quadrant this rect fits in or -1 if it doesn't fit any quadrant
param rect- The rect to test with.
returns The index of the quadrant fitting the rect completely, or -1 if none.
(rect: Rect)
=> number[] Returns the quadrants this rect intersects
param rect- The rect to test with. Note that this rect is assumed to be within the node.
returns the list of quadrant indices
(obj: T, bbox: Rect)
=> void Inserts the object with the given rectangle
param obj- The object to add
param bbox- The bounding box of the object
(rect: Rect, retrieveCb: (obj: T) => void)
=> void Retrieves all objects potentially intersecting the rectangle
param rect- The rect to test with
returns A set of objects potentially intersecting the rectangle
(obj: T, fast?: boolean)
=> boolean Removes the object
param obj- The object to remove
param fast- No node collapse if true
(obj: T, bbox: Rect, fast?: boolean)
=> void Updates a single object
Note that no testing is done here. Make sure the object needs to be actually updated.
param obj- The object to update
param bbox- The new bounding box
(bbox: Rect)
=> boolean True if the rectangle is completely outside this node's bounds
param bbox- The bounding box to test
(bbox: Rect)
=> boolean True if the rectangle is completely outside this node's bounds
param bbox- The bounding box to test
()
=> void Clears this node and collapses it
(ancestorObjects: Array<T>, pairCb: (obj1: T, obj2: T) => void)
=> void Gathers all collision pairs in this node and child nodes
param ancestorObjects- Objects in one of the node's ancestors
param pairCb- The pairs being gathered