|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.spatial.octree.OcTree<T>
public class OcTree<T extends SpatialNode>
This is a non-standard OcTree implementation.
It provides the possibility to use extended cells. These extended cells
are cells, that don't cover an octant of the parent cell,
but a half (one of six) or a quadrant (one of twelve).
| Constructor Summary | |
|---|---|
OcTree(float centerX,
float centerY,
float centerZ,
float size,
boolean useExtendedCells)
|
|
OcTree(float centerX,
float centerY,
float centerZ,
float sizeX,
float sizeY,
float sizeZ,
boolean useExtendedCells)
|
|
OcTree(Tuple3f center,
float size,
boolean useExtendedCells)
|
|
OcTree(Tuple3f center,
float sizeX,
float sizeY,
float sizeZ,
boolean useExtendedCells)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all nodes from this OcTree. |
void |
dump()
Dumps the whole OcTree to System.out. |
float |
getCenterX()
|
float |
getCenterY()
|
float |
getCenterZ()
|
int |
getMaxLevel()
|
int |
getMaxLevelForExtendedCells()
|
int |
getMinNodesBeforeSplit()
|
OcCell<T> |
getRootCell()
|
float |
getSizeX()
|
float |
getSizeY()
|
float |
getSizeZ()
|
int |
insertNode(T node)
Inserts a node into the OcTree. |
void |
removeNode(T node)
Removes the node from the OcTree (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 |
| Constructor Detail |
|---|
public OcTree(float centerX,
float centerY,
float centerZ,
float sizeX,
float sizeY,
float sizeZ,
boolean useExtendedCells)
public OcTree(Tuple3f center,
float sizeX,
float sizeY,
float sizeZ,
boolean useExtendedCells)
public OcTree(float centerX,
float centerY,
float centerZ,
float size,
boolean useExtendedCells)
public OcTree(Tuple3f center,
float size,
boolean useExtendedCells)
| Method Detail |
|---|
public final OcCell<T> getRootCell()
OcTree's root OcCell.public final int getMaxLevel()
OcTree.public final float getCenterX()
OcTree (or of the root cell).public final float getCenterY()
OcTree (or of the root cell).public final float getCenterZ()
OcTree (or of the root cell).public final float getSizeX()
OcTree (or of the root cell).public final float getSizeY()
OcTree (or of the root cell).public final float getSizeZ()
OcTree (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)
OcTree. This first searches the
OcCell to insert and then places the node into the cell.
node -
OcCell, the node has been inserted to.public final void removeNode(T node)
OcTree (from its container cell).
node - public final void clear()
OcTree.
public final void updateNodePosition(T node)
node - public void dump()
OcTree to System.out.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||