Package org.tinfour.common
Class SimpleTriangleIterator
- java.lang.Object
-
- org.tinfour.common.SimpleTriangleIterator
-
- All Implemented Interfaces:
Iterator<SimpleTriangle>
public class SimpleTriangleIterator extends Object implements Iterator<SimpleTriangle>
An implementation of an iterator for looping through the triangles implicit in a Triangulated Irregular Network.Note: The Tinfour incremental TIN classes do not actual construct triangle objects as part of their structure. The fundamental element in a TIN is the edge structure. Triangle objects are constructed by the iterator at run time. This approach reduces the overall memory requirements for the TIN.
This iterator will identify all unique triangles implicit in the structure of the TIN and will deliver them to the calling application.
This class is not thread safe. Applications must not modify the TIN (by adding or removing points) while using the iterator.
-
-
Constructor Summary
Constructors Constructor Description SimpleTriangleIterator(IIncrementalTin tin)Construct an instance of the iterator based on the specified Incremental TIN structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()SimpleTrianglenext()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
SimpleTriangleIterator
public SimpleTriangleIterator(IIncrementalTin tin)
Construct an instance of the iterator based on the specified Incremental TIN structure.- Parameters:
tin- a valid instance
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<SimpleTriangle>
-
next
public SimpleTriangle next()
- Specified by:
nextin interfaceIterator<SimpleTriangle>
-
-