|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.vecmath.geom.Octree.Cell
public abstract static class Octree.Cell
A Cell
represents a cell of an Octree
.
The array children
contains
the eight children of this cell, if it is an inner node
of the octree, otherwise it is null
. The children
are equal in size and represent a decomposition of their parent.
A leaf Cell
also includes a list of volumes whose
boundaries are contained in the cell.
Field Summary | |
---|---|
Octree.Cell |
back
|
Octree.Cell |
bottom
|
Octree.Cell[] |
children
The eight child nodes of this cell, or null
if this cell is a leaf of the octree. |
Octree.Cell |
front
|
Octree.Cell |
left
|
Octree.Cell |
right
|
static int |
ROOT_POSITION
|
Octree.Cell |
top
|
Constructor Summary | |
---|---|
Octree.Cell(int position)
|
Method Summary | |
---|---|
abstract void |
addVolume(Volume v)
Adds a volume to this cell. |
abstract void |
clearVolumes()
Clears the list of volumes of this cell. |
protected abstract Octree.Cell |
createChild(int position)
This factory method creates a new cell of the same class as this cell. |
void |
getExtent(Octree tree,
Tuple3d min,
Tuple3d max)
Determines the spatial extent of this cell. |
abstract Volume |
getVolume(int index,
Octree.State state)
Returns the index th volume of the list
of volumes of this cell. |
abstract int |
getVolumeCount()
Returns the number of volumes in this cell. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Octree.Cell back
public Octree.Cell bottom
public Octree.Cell[] children
null
if this cell is a leaf of the octree.
public Octree.Cell front
public Octree.Cell left
public Octree.Cell right
public static final int ROOT_POSITION
public Octree.Cell top
Constructor Detail |
---|
public Octree.Cell(int position)
Method Detail |
---|
public abstract void addVolume(Volume v)
v
must be a volume
which has been returned previously by the invocation of
getVolume(int, de.grogra.vecmath.geom.Octree.State)
on the parent cell.
v
- volume of parent cell which has to be added to this cellpublic abstract void clearVolumes()
protected abstract Octree.Cell createChild(int position)
position
- value for position
public void getExtent(Octree tree, Tuple3d min, Tuple3d max)
tree
- the octree to which this cell belongsmin
- the minimum coordinates will be placed in heremax
- the maximum coordinates will be placed in herepublic abstract Volume getVolume(int index, Octree.State state)
index
th volume of the list
of volumes of this cell. The returned volume may only
be used up to the next invocation of this method with
the same state
, so that the state is allowed
to store information about the volume.
index
- index of volume in liststate
- instance of State
as returned by Octree.createState()
index
public abstract int getVolumeCount()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |