public interface QuadTree<T extends Positionable> extends PositionChangeListener<T>, Parallelogram
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T element)
Adds an element to this
QuadTree |
void |
addAll(com.badlogic.gdx.utils.Array<T> elements)
Adds all element to this
QuadTree. |
void |
clear()
Same a
removeAll(Array) except the results are not stored |
void |
debugRender(Graphics g) |
com.badlogic.gdx.utils.Array<T> |
getElements() |
void |
getElements(com.badlogic.gdx.utils.Array<T> result) |
void |
getElementsContainingPoint(com.badlogic.gdx.utils.Array<T> result,
Point point) |
com.badlogic.gdx.utils.Array<T> |
getElementsContainingPoint(Point point) |
void |
getElementsIntersectingLineSegment(com.badlogic.gdx.utils.Array<T> result,
LineSegment lineSegment) |
com.badlogic.gdx.utils.Array<T> |
getElementsIntersectingLineSegment(LineSegment lineSegment) |
void |
getElementsWithinArea(com.badlogic.gdx.utils.Array<T> result,
Shape area) |
com.badlogic.gdx.utils.Array<T> |
getElementsWithinArea(Shape area) |
float |
getMinimumQuadHeight() |
float |
getMinimumQuadWidth() |
QuadTree<T> |
getParent() |
int |
getTotalElements() |
int |
getTotalQuads() |
boolean |
remove(T element)
Removes an element from this
QuadTree |
void |
removeAll(com.badlogic.gdx.utils.Array<T> elements)
Removes all elements in this
QuadTree and stores them in an Array |
positionChangedcontains, contains, getHeight, getMaxX, getMaxY, getRotation, getWidth, getX, getY, intersects, intersects, intersectsLineSegment, rotate, rotateAround, setRotation, setRotationAroundvoid debugRender(Graphics g)
boolean add(T element)
QuadTreeelement - The element to addboolean remove(T element)
QuadTreeelement - The element to removevoid addAll(com.badlogic.gdx.utils.Array<T> elements)
QuadTree. Note that if an element exists outside of this QuadTree's bounds, it will not be addedelements - The elements to addvoid removeAll(com.badlogic.gdx.utils.Array<T> elements)
QuadTree and stores them in an Arrayelements - After executing, this Array will contain all the removed elementsvoid clear()
removeAll(Array) except the results are not storedvoid getElementsWithinArea(com.badlogic.gdx.utils.Array<T> result, Shape area)
com.badlogic.gdx.utils.Array<T> getElementsIntersectingLineSegment(LineSegment lineSegment)
void getElementsIntersectingLineSegment(com.badlogic.gdx.utils.Array<T> result, LineSegment lineSegment)
void getElementsContainingPoint(com.badlogic.gdx.utils.Array<T> result, Point point)
com.badlogic.gdx.utils.Array<T> getElements()
void getElements(com.badlogic.gdx.utils.Array<T> result)
int getTotalQuads()
int getTotalElements()
float getMinimumQuadWidth()
float getMinimumQuadHeight()