goog.structs.QuadTree
Instance Methods
this.clear() → void
void
Removes all items from the tree.
this.clone() → goog.structs.QuadTree
goog.structs.QuadTree
Clones the quad-tree and returns the new instance.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.contains( x, y ) → boolean
boolean
this.forEach( fn, opt_obj ) → void
void
Traverses the tree and calls a function on each node.
Parameters |
|
---|
this.get( x, y, opt_default ) → *
*
Gets the value of the point at (x, y) or null if the point is empty.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.getCount() → number
number
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getKeys() → Array<(goog.math.Coordinate|null)>
Array<(goog.math.Coordinate|null)>
Returns an array containing the coordinates of each point stored in the tree.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getRootNode() → (goog.structs.QuadTree.Node|null)
(goog.structs.QuadTree.Node|null)
Returns a reference to the tree's root node. Callers shouldn't modify nodes, directly. This is a convenience for visualization and debugging purposes.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.isEmpty() → boolean
boolean
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.remove( x, y ) → *
*
this.set( x, y, value ) → void
void