|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.spatial.quadtree.QuadTree<T>
public class QuadTree<T extends SpatialNode>
This is a non-standard QuadTree implementation.
It provides the possibility to use extended cells. These extended cells
are cells, that don't cover a quadant of the parent cell,
but also a half (one of four).
| Field Summary | |
|---|---|
static PlaneIndicator |
DEFAULT_PLANE
|
| Constructor Summary | |
|---|---|
QuadTree(float centerX,
float centerY,
float centerZ,
AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(float centerX,
float centerY,
float centerZ,
AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
QuadTree(float centerX,
float centerY,
float centerZ,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(float centerX,
float centerY,
float centerZ,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
QuadTree(float centerX,
float centerY,
float centerZ,
PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(float centerX,
float centerY,
float centerZ,
PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
|
|
QuadTree(Tuple3f center,
PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all nodes from this QuadTree. |
void |
dump()
Dumps the whole QuadTree to System.out. |
float |
getCenterX()
|
float |
getCenterY()
|
float |
getCenterZ()
|
float |
getDepth()
|
int |
getMaxLevel()
|
int |
getMaxLevelForExtendedCells()
|
int |
getMinNodesBeforeSplit()
|
PlaneIndicator |
getPlane()
|
QuadCell<T> |
getRootCell()
|
AxisIndicator |
getUpAxis()
|
float |
getWidth()
|
int |
insertNode(T node)
Inserts a node into the QuadTree. |
void |
removeNode(T node)
Removes the node from the QuadTree (from its container cell). |
void |
setMaxLevelForExtendedCells(int maxLevelForExtendedCells)
Sets the maximum number of nodes, that can be inserted into a cell before it is splitted into extended cells. |
void |
setMinNodesBeforeSplit(int minNodesBeforeSplit)
Sets the minimum number of nodes, that must be inserted into a cell to make the cell be splitted. |
void |
updateNodePosition(T node)
This method must be called after a node's position or size has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PlaneIndicator DEFAULT_PLANE
| Constructor Detail |
|---|
public QuadTree(float centerX,
float centerY,
float centerZ,
PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
PlaneIndicator plane,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(float centerX,
float centerY,
float centerZ,
PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
PlaneIndicator plane,
float size,
float height,
boolean useExtendedCells)
public QuadTree(float centerX,
float centerY,
float centerZ,
AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
AxisIndicator upAxis,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(float centerX,
float centerY,
float centerZ,
AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
AxisIndicator upAxis,
float size,
float height,
boolean useExtendedCells)
public QuadTree(float centerX,
float centerY,
float centerZ,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
float width,
float depth,
float height,
boolean useExtendedCells)
public QuadTree(float centerX,
float centerY,
float centerZ,
float size,
float height,
boolean useExtendedCells)
public QuadTree(Tuple3f center,
float size,
float height,
boolean useExtendedCells)
| Method Detail |
|---|
public final PlaneIndicator getPlane()
QuadTree.public final AxisIndicator getUpAxis()
QuadTree.public final QuadCell<T> getRootCell()
QuadTree's root QuadCell.public final int getMaxLevel()
QuadTree.public final float getCenterX()
QuadTree (or of the root cell).public final float getCenterY()
QuadTree (or of the root cell).public final float getCenterZ()
QuadTree (or of the root cell).public final float getWidth()
QuadTree (or of the root cell).public final float getDepth()
QuadTree (or of the root cell).public void setMinNodesBeforeSplit(int minNodesBeforeSplit)
minNodesBeforeSplit - public final int getMinNodesBeforeSplit()
public void setMaxLevelForExtendedCells(int maxLevelForExtendedCells)
maxLevelForExtendedCells - public final int getMaxLevelForExtendedCells()
public final int insertNode(T node)
QuadTree. This first searches the
QuadCell to insert and then places the node into the cell.
node -
QuadCell, the node has been inserted to.public final void removeNode(T node)
QuadTree (from its container cell).
node - public final void clear()
QuadTree.
public final void updateNodePosition(T node)
node - public void dump()
QuadTree to System.out.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||