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 |
positionChanged
contains, contains, getHeight, getMaxX, getMaxY, getRotation, getWidth, getX, getY, intersects, intersects, intersectsLineSegment, rotate, rotateAround, setRotation, setRotationAround
void debugRender(Graphics g)
boolean add(T element)
QuadTree
element
- The element to addboolean remove(T element)
QuadTree
element
- 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 Array
elements
- 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()