sortShellsAndHoles method

void sortShellsAndHoles(
  1. List edgeRings,
  2. List shellList,
  3. List freeHoleList
)

For all rings in the input list, determine whether the ring is a shell or a hole and add it to the appropriate list. Due to the way the DirectedEdges were linked, a ring is a shell if it is oriented CW, a hole otherwise.

Implementation

void sortShellsAndHoles(List edgeRings, List shellList, List freeHoleList) {
  for (EdgeRing er in edgeRings) {
//      er.setInResult();
    if (er.isHole()) {
      freeHoleList.add(er);
    } else {
      shellList.add(er);
    }
  }
}