IQuadtree

Functions

Link copied to clipboard
abstract fun clear()

Clears the whole tree

Link copied to clipboard
abstract fun findNode(element: T): Quadtree<T>?

Finds which node the element is within (but not necessarily belonging to)

Link copied to clipboard
abstract fun insert(element: T): Boolean

Inserts the element in the appropriate node

Link copied to clipboard
abstract fun nearest(element: T, radius: Double): QuadtreeQuery<T>?

Finds the nearest and neighbouring points within a radius

Link copied to clipboard
abstract fun nearestToPoint(point: Vector2, radius: Double): QuadtreeQuery<T>?

Finds the nearest and neighbouring objects within a radius (needs to have a different name so there is no ambiguity when the generic object type is Vector2)

Link copied to clipboard
abstract fun remove(element: T): Boolean

Remove the given element