question: protected void findCandidateCrossings ( S2Point a , S2Point b , List < Integer > candidateCrossings ) { Preconditions . checkState ( indexComputed ) ; ArrayList < S2CellId > cover = Lists . newArrayList ( ) ; getCovering ( a , b , false , cover ) ; Set < Integer > uniqueSet = new HashSet < Integer > ( ) ; getEdgesInParentCells ( cover , uniqueSet ) ; getEdgesInChildrenCells ( a , b , cover , uniqueSet ) ; candidateCrossings . clear ( ) ; candidateCrossings . addAll ( uniqueSet ) ; }
target:  Appends to "candidateCrossings" all edge references which may cross the given edge. This is done by covering the edge and then finding all references of edges whose coverings overlap this covering. Parent cells are checked level by level. Child cells are checked all at once by taking advantage of the natural ordering of S2CellIds.