| Modifier and Type | Field and Description |
|---|---|
| public int | |
| public int | |
| public static final int | |
| public float | |
| public final int | |
| public final int | |
| public QuadTreeFloat | |
| public QuadTreeFloat | |
| private static final Pool | |
| public QuadTreeFloat | |
| public QuadTreeFloat | |
| public static final int | |
| public float[] | values
For each entry, stores the value, x, and y. |
| public float | |
| public static final int | |
| public float | |
| public static final int | |
| public float |
| Access | Constructor and Description |
|---|---|
| public | |
| public | QuadTreeFloat(int
The maximum number of values stored in each quad tree node. When exceeded, the node is split into 4 child
nodes. If the maxDepth has been reached, more than maxValues may be stored. maxValues, int The maximum depth of the tree nodes. Nodes at the maxDepth will not be split and may store more than
maxValues number of entries. maxDepth)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| private void | |
| protected int | growValues()
Returns a new length for |
| public boolean | nearest(float x, float y, FloatArray result)
Returns: false if no entry was found because the quad tree was empty or the specified point is farther than the larger of the quad tree's width or height from an entry. |
| private QuadTreeFloat | |
| public void | |
| private void | query(float centerX, float centerY, float radiusSqr, float rectX, float rectY, float rectSize, FloatArray results)
|
| public void | |
| public void | |
| public void | |
| private void |
| count | back to summary |
|---|---|
| public int count The number of elements stored in | |
| depth | back to summary |
|---|---|
| public int depth | |
| DISTSQR | back to summary |
|---|---|
| public static final int DISTSQR | |
| height | back to summary |
|---|---|
| public float height | |
| maxDepth | back to summary |
|---|---|
| public final int maxDepth | |
| maxValues | back to summary |
|---|---|
| public final int maxValues | |
| ne | back to summary |
|---|---|
| public QuadTreeFloat ne
| |
| nw | back to summary |
|---|---|
| public QuadTreeFloat nw
| |
| pool | back to summary |
|---|---|
| private static final Pool<QuadTreeFloat> pool | |
| se | back to summary |
|---|---|
| public QuadTreeFloat se
| |
| sw | back to summary |
|---|---|
| public QuadTreeFloat sw
| |
| VALUE | back to summary |
|---|---|
| public static final int VALUE | |
| values | back to summary |
|---|---|
| public float[] values For each entry, stores the value, x, and y. | |
| width | back to summary |
|---|---|
| public float width | |
| X | back to summary |
|---|---|
| public static final int X | |
| x | back to summary |
|---|---|
| public float x | |
| Y | back to summary |
|---|---|
| public static final int Y | |
| y | back to summary |
|---|---|
| public float y | |
| QuadTreeFloat | back to summary |
|---|---|
| public QuadTreeFloat() Creates a quad tree with 16 for maxValues and 8 for maxDepth. | |
| QuadTreeFloat | back to summary |
|---|---|
public QuadTreeFloat(int maxValues, int maxDepth)
| |
| add | back to summary |
|---|---|
| public void add(float value, float valueX, float valueY) | |
| addToChild | back to summary |
|---|---|
| private void addToChild(float value, float valueX, float valueY) | |
| findNearestInternal | back to summary |
|---|---|
| private void findNearestInternal(float x, float y, FloatArray result) | |
| growValues | back to summary |
|---|---|
| protected int growValues() Returns a new length for | |
| nearest | back to summary |
|---|---|
public boolean nearest(float x, float y, FloatArray result)
| |
| obtainChild | back to summary |
|---|---|
| private QuadTreeFloat obtainChild(float x, float y, float width, float height, int depth) | |
| query | back to summary |
|---|---|
public void query(float centerX, float centerY, float radius, FloatArray results)
| |
| query | back to summary |
|---|---|
| private void query(float centerX, float centerY, float radiusSqr, float rectX, float rectY, float rectSize, FloatArray results) | |
| query | back to summary |
|---|---|
public void query(Rectangle rect, FloatArray results)
| |
| reset | back to summary |
|---|---|
| public void reset() Implements com. Doc from com. Resets the object for reuse. Object references should be nulled and fields may be set to default values. | |
| setBounds | back to summary |
|---|---|
| public void setBounds(float x, float y, float width, float height) | |
| split | back to summary |
|---|---|
| private void split(float value, float valueX, float valueY) | |