org.critterai.nmgen
Class SolidHeightfield.SolidHeightFieldIterator

java.lang.Object
  extended by org.critterai.nmgen.SolidHeightfield.SolidHeightFieldIterator
All Implemented Interfaces:
Iterator<HeightSpan>
Enclosing class:
SolidHeightfield

public class SolidHeightfield.SolidHeightFieldIterator
extends Object
implements Iterator<HeightSpan>

Implements 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.


Method Summary
 int depthIndex()
          The depth index of the last span returned by next()
 boolean hasNext()
          
 HeightSpan 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<HeightSpan>

next

public HeightSpan next()

Specified by:
next in interface Iterator<HeightSpan>

remove

public void remove()
This operation is not supported.

Specified by:
remove in interface Iterator<HeightSpan>

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.