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 Details

    • DataEdgeIterator

      public DataEdgeIterator(S2EdgeIndex edgeIndex)
  • Method Details

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