public class RegionalQuad<T extends Parallelogram> extends Rectangle implements Quad<T>
Quad based on regions| Constructor and Description |
|---|
RegionalQuad(Quad<T> parent,
float x,
float y,
float width,
float height) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T object)
Adds an element to this
Quad |
int |
getElementLimit()
Returns the maximum number of elements per
Quad |
float |
getHeight() |
List<T> |
getIntersectionsFor(LineSegment line) |
int |
getNumberOfElements()
Returns the number of elements within this
Quad |
Quad<T> |
getParent()
|
List<Quad<T>> |
getQuadsFor(LineSegment line) |
List<Quad<T>> |
getQuadsFor(T object) |
List<T> |
getValues()
|
float |
getWidth() |
float |
getX() |
float |
getY() |
void |
positionChanged(T moved) |
void |
remove(T object)
Removes an element from this
Quad |
List<T> |
removeAll() |
addPostionChangeListener, contains, contains, contains, draw, getCenterX, getCenterY, getDistanceTo, getMaxX, getMaxY, getMinX, getMinY, getNumberOfSides, getRotation, intersection, intersects, intersects, intersects, intersects, removePositionChangeListener, rotate, rotateAround, set, set, set, setHeight, setWidth, setX, setYpublic void add(T object)
QuadQuadadd in interface Quad<T extends Parallelogram>object - The element to be addedpublic void remove(T object)
QuadQuadremove in interface Quad<T extends Parallelogram>object - The element to be removedpublic int getNumberOfElements()
QuadQuadgetNumberOfElements in interface Quad<T extends Parallelogram>Quadpublic List<Quad<T>> getQuadsFor(LineSegment line)
public List<T> getIntersectionsFor(LineSegment line)
public void positionChanged(T moved)
positionChanged in interface PositionChangeListener<T extends Parallelogram>public Quad<T> getParent()
QuadgetParent in interface Quad<T extends Parallelogram>Quadpublic float getX()
getX in interface PositionablegetX in class com.badlogic.gdx.math.Rectanglepublic float getY()
getY in interface PositionablegetY in class com.badlogic.gdx.math.Rectanglepublic float getWidth()
getWidth in interface ParallelogramgetWidth in class com.badlogic.gdx.math.Rectanglepublic float getHeight()
getHeight in interface ParallelogramgetHeight in class com.badlogic.gdx.math.Rectanglepublic int getElementLimit()
QuadQuadgetElementLimit in interface Quad<T extends Parallelogram>Copyright © 2014. All rights reserved.