queryRectangle
fun queryRectangle(rectangle: Rectangle, result: MutableList<Int> = mutableListOf()): MutableList<Int>(source)
Queries the tree for all objects that intersect with the given rectangle.
Return
A list containing the indices of objects that intersect the given rectangle.
Parameters
rectangle
The rectangle used to query intersecting objects.
result
A mutable list that will hold the indices of intersecting objects. If not provided, a new list will be created and returned.