API Docs for: 0.99.4
Show:

JXG.Math.Quadtree Class

Defined in: src/math/qdt.js:46
Module: JXG

Instantiate a new quad tree.

Constructor

JXG.Math.Quadtree

(
  • bbox
)

Defined in src/math/qdt.js:46

Parameters:

  • bbox Array

    Bounding box of the new quad (sub)tree.

Methods

_query

(
  • x
  • y
)
Boolean | JXG.Quadtree private

Defined in src/math/qdt.js:185

Internal _query method that lacks adjustment of the parameter.

Parameters:

Returns:

Boolean | JXG.Quadtree:

The quad tree if the point is found, false if none of the quad trees contains the point (i.e. the point is not inside the root tree's AABB).

contains

(
  • x
  • y
)
Boolean

Defined in src/math/qdt.js:111

Checks if the given coordinates are inside the quad tree.

Parameters:

Returns:

insert

(
  • p
)
Boolean

Defined in src/math/qdt.js:123

Insert a new point into this quad tree.

Parameters:

Returns:

query

(
  • xp
  • y
)
Boolean | JXG.Quadtree private

Defined in src/math/qdt.js:228

Retrieve the smallest quad tree that contains the given point.

Parameters:

Returns:

Boolean | JXG.Quadtree:

The quad tree if the point is found, false if none of the quad trees contains the point (i.e. the point is not inside the root tree's AABB).

subdivide

()

Defined in src/math/qdt.js:161

Subdivide the quad tree.

Properties

capacity

Number

Defined in src/math/qdt.js:54

The maximum number of points stored in a quad tree node before it is subdivided.

Default: 10

northEast

JXG.Quadtree

Defined in src/math/qdt.js:85

In a subdivided quad tree this represents the top right subtree.

northWest

JXG.Quadtree

Defined in src/math/qdt.js:77

In a subdivided quad tree this represents the top left subtree.

points

Array

Defined in src/math/qdt.js:64

Point storage.

southEast

JXG.Quadtree

Defined in src/math/qdt.js:93

In a subdivided quad tree this represents the bottom right subtree.

southWest

JXG.Quadtree

Defined in src/math/qdt.js:101

In a subdivided quad tree this represents the bottom left subtree.