Class JXG.Math.Quadtree
↳ JXG.Math.Quadtree
Defined in: qdt.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JXG.Math.Quadtree(bbox, config, parent)
Instantiate a new quadtree.
|
Field Attributes | Field Name and Description |
---|---|
<private> |
Internal _query method that lacks adjustment of the parameter.
|
<static> |
JXG.Math.Quadtree.config
Configuration object for quadtree.
|
In a subdivided quadtree this represents the top right subtree.
|
|
In a subdivided quadtree this represents the top left subtree.
|
|
Parent quadtree or null if there is not parent.
|
|
Point storage.
|
|
Retrieve the smallest quad tree that contains the given coordinate pair.
|
|
In a subdivided quadtree this represents the bottom right subtree.
|
|
In a subdivided quadtree this represents the bottom left subtree.
|
Method Attributes | Method Name and Description |
---|---|
contains(x, y)
Checks if the given coordinates are inside of the boundaries of the quadtree.
|
|
hasPoint(x, y, tol)
Check if the quadtree has a point which is inside of a sphere of
radius tol around [x, y].
|
|
insert(p)
Insert a new point into this quadtree if it is inside of
the quadtree's boundaries.
|
|
Subdivide the quadtree.
|
Class Detail
JXG.Math.Quadtree(bbox, config, parent)
Instantiate a new quadtree.
- Parameters:
- {Array} bbox
- Bounding box of the new quad (sub)tree.
- {Object} config
- Configuration object. Default value: to {capacity: 10}
- {Object} parent Optional
- Parent object or null if root.
Field Detail
<private>
{Boolean|JXG.Quadtree}
_query
Internal _query method that lacks adjustment of the parameter.
<static>
{Object}
JXG.Math.Quadtree.config
Configuration object for quadtree.
{JXG.Math.Quadtree}
northEast
In a subdivided quadtree this represents the top right subtree.
{JXG.Math.Quadtree}
northWest
In a subdivided quadtree this represents the top left subtree.
{JXG.Math.Quadtree}
parent
Parent quadtree or null if there is not parent.
{Array}
points
Point storage.
{Boolean|JXG.Quadtree}
query
Retrieve the smallest quad tree that contains the given coordinate pair.
{JXG.Math.Quadtree}
southEast
In a subdivided quadtree this represents the bottom right subtree.
{JXG.Math.Quadtree}
southWest
In a subdivided quadtree this represents the bottom left subtree.
Method Detail
{Boolean}
contains(x, y)
Checks if the given coordinates are inside of the boundaries of the quadtree.
The quadtree is open to the left and botton and closed to
right and top.
- Parameters:
- {Number} x
- {Number} y
- Returns:
- {Boolean}
{Array}
getAllPoints()
- Returns:
- {Array}
{Boolean}
hasPoint(x, y, tol)
Check if the quadtree has a point which is inside of a sphere of
radius tol around [x, y].
- Parameters:
- {Number} x
- {Number} y
- {Number} tol
- Returns:
- {Boolean}
{Boolean}
insert(p)
Insert a new point into this quadtree if it is inside of
the quadtree's boundaries.
- Parameters:
- {JXG.Coords} p
- Returns:
- {Boolean} true if insert succeeded, false otherwise.
subdivide()
Subdivide the quadtree.