de.grogra.vecmath.geom
public class DefaultCellIterator extends java.lang.Object implements CellIterator, java.lang.Cloneable
| Constructor and Description |
|---|
DefaultCellIterator() |
| 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.
|
boolean |
hasNext() |
protected boolean |
hasNextImpl() |
void |
initialize(Octree tree)
This method has to be invoked once to initialize the iterator
for a given octree.
|
Octree.Cell |
next() |
void |
remove() |
void |
setLine(Line line)
This method has to invoked in order to start a new iteration
sequence over the octree cells which intersect
line. |
public CellIterator dup()
CellIteratorCellIterator.
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.dup in interface CellIteratorpublic double getEnteringParameter()
CellIterator#nextCell(). This cell is entered at the
position line.start + parameter * line.direction.getEnteringParameter in interface CellIteratorpublic boolean hasNext()
hasNext in interface java.util.Iterator<Octree.Cell>protected boolean hasNextImpl()
public void initialize(Octree tree)
CellIteratorinitialize in interface CellIteratortree - the octreepublic Octree.Cell next()
next in interface java.util.Iterator<Octree.Cell>public void remove()
remove in interface java.util.Iterator<Octree.Cell>public void setLine(Line line)
CellIteratorline.setLine in interface CellIteratorline - the line for which octree cells shall be enumerated