public class RegionalQuad<T extends Parallelogram> extends Rectangle implements Quad<T>
Quad
based on regionsConstructor 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, setY
public void add(T object)
Quad
Quad
add
in interface Quad<T extends Parallelogram>
object
- The element to be addedpublic void remove(T object)
Quad
Quad
remove
in interface Quad<T extends Parallelogram>
object
- The element to be removedpublic int getNumberOfElements()
Quad
Quad
getNumberOfElements
in interface Quad<T extends Parallelogram>
Quad
public 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()
Quad
getParent
in interface Quad<T extends Parallelogram>
Quad
public float getX()
getX
in interface Positionable
getX
in class com.badlogic.gdx.math.Rectangle
public float getY()
getY
in interface Positionable
getY
in class com.badlogic.gdx.math.Rectangle
public float getWidth()
getWidth
in interface Parallelogram
getWidth
in class com.badlogic.gdx.math.Rectangle
public float getHeight()
getHeight
in interface Parallelogram
getHeight
in class com.badlogic.gdx.math.Rectangle
public int getElementLimit()
Quad
Quad
getElementLimit
in interface Quad<T extends Parallelogram>
Copyright © 2014. All rights reserved.