PointQuadTree

class PointQuadTree<T : PointQuadTree.Item> @JvmOverloads constructor(mBounds: Bounds, mDepth: Int = 0)

A quad tree which tracks items with a Point geometry. See http://en.wikipedia.org/wiki/Quadtree for details on the data structure. This class is not thread safe.

Constructors

Link copied to clipboard
constructor(minX: Double, maxX: Double, minY: Double, maxY: Double)
constructor(mBounds: Bounds, mDepth: Int = 0)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Item

Functions

Link copied to clipboard
fun add(item: T)

Insert an item.

Link copied to clipboard
fun clear()

Removes all points from the quadTree

Link copied to clipboard
fun remove(item: T): Boolean

Remove the given item from the set.

Link copied to clipboard
fun search(searchBounds: Bounds): Collection<T>

Search for all items within a given bounds.