de.grogra.vecmath.geom
public interface CellIterator extends java.util.Iterator<Octree.Cell>
CellIterator is used to iterate over the cells of an
octree which are intersected by a line. The iterated cells are
ordered according to their position on the line. A typical usage is:
iterator.setLine (line);
while (iterator.hasNext ())
{
Octree.Cell c = iterator.nextCell ();
double param = iterator.getEnteringParameter ();
...
}
| Modifier and Type | Method and Description |
|---|---|
CellIterator |
dup()
Returns a clone of this
CellIterator. |
double |
getEnteringParameter()
Returns the parameter at which the current cell was entered.
|
void |
initialize(Octree tree)
This method has to be invoked once to initialize the iterator
for a given octree.
|
void |
setLine(Line line)
This method has to invoked in order to start a new iteration
sequence over the octree cells which intersect
line. |
CellIterator dup()
CellIterator.
All constant variables which are related to the structure
of the octree are copied shallowly, state variables of the
iterator are newly created without copying.double getEnteringParameter()
#nextCell(). This cell is entered at the
position line.start + parameter * line.direction.void initialize(Octree tree)
tree - the octreevoid setLine(Line line)
line.line - the line for which octree cells shall be enumerated