Package com.google.common.geometry
Class S2EdgeIndex.DataEdgeIterator
- java.lang.Object
-
- com.google.common.geometry.S2EdgeIndex.DataEdgeIterator
-
- Enclosing class:
- S2EdgeIndex
public static class S2EdgeIndex.DataEdgeIterator extends Object
An iterator on data edges that may cross a query edge (a,b). Create the iterator, call getCandidates(), then hasNext()/next() repeatedly.The current edge in the iteration has index index(), goes between from() and to().
-
-
Constructor Summary
Constructors Constructor Description DataEdgeIterator(S2EdgeIndex edgeIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetCandidates(S2Point a, S2Point b)Initializes the iterator to iterate over a set of candidates that may cross the edge (a,b).booleanhasNext()False if there are no more candidates; true otherwise.intindex()Index of the current edge in the iteration.voidnext()Iterate to the next available candidate.
-
-
-
Constructor Detail
-
DataEdgeIterator
public DataEdgeIterator(S2EdgeIndex edgeIndex)
-
-
Method Detail
-
getCandidates
public void getCandidates(S2Point a, S2Point b)
Initializes the iterator to iterate over a set of candidates that may cross the edge (a,b).
-
index
public int index()
Index of the current edge in the iteration.
-
hasNext
public boolean hasNext()
False if there are no more candidates; true otherwise.
-
next
public void next()
Iterate to the next available candidate.
-
-