Hierarchy

  • QuadTree

Constructors

Properties

_NE?: QuadTree

The North East subtree

_NW?: QuadTree

the North West subtree

_SE?: QuadTree

the South East subtree

_SW?: QuadTree

the South West subtree

_divided: boolean

Used to know if the current instance is divided or not (branch or leaf)

_points: Point[]

The point contained in this instance

capacity: number

the points capacity

rectangle: Rectangle

the instance rectangle area

Methods

  • Queries the instance using a Rectangle object, with the given position and the given size

    Returns

    the particles inside the given range

    Parameters

    • range: Range

      the range to use for querying the tree

    • Optional check: ((particle: Particle) => boolean)

      the function to check if the particle can be added to the result

    • Optional found: Particle[]

      found particles array, output parameter

    Returns Particle[]