org.critterai.nmgen
Class OpenHeightfield.OpenHeightFieldIterator

java.lang.Object
  extended by org.critterai.nmgen.OpenHeightfield.OpenHeightFieldIterator
All Implemented Interfaces:
Iterator<OpenHeightSpan>
Enclosing class:
OpenHeightfield

public final class OpenHeightfield.OpenHeightFieldIterator
extends Object
implements Iterator<OpenHeightSpan>

An iterator that will iterate through all spans within a height field. (Not just the base spans.)

Behavior of the iterator is undefined if the interator's source is changed during iteration.

The iterator returned by OpenHeightfield.dataIterator().


Method Summary
 int depthIndex()
          The depth index of the last span returned by next()
 boolean hasNext()
          
 OpenHeightSpan next()
          
 void remove()
           This operation is not supported.
 void reset()
          Resets the iterator so that it can be re-used.
 int widthIndex()
          The width index of the last span returned by next()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

depthIndex

public int depthIndex()
The depth index of the last span returned by next()

Returns:
The depth index of the last span returned by next()

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<OpenHeightSpan>

next

public OpenHeightSpan next()

Specified by:
next in interface Iterator<OpenHeightSpan>

remove

public void remove()
This operation is not supported.

Specified by:
remove in interface Iterator<OpenHeightSpan>

reset

public void reset()
Resets the iterator so that it can be re-used.


widthIndex

public int widthIndex()
The width index of the last span returned by next()

Returns:
The width index of the last span returned by next()


Project Home and Source Code

Copyright 2010 Stephen Pratt. All rights reserved. Use is subject to license terms.