/// <summary> /// 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. /// </summary> /// <param name="edgeRings"></param> /// <param name="shellList"></param> /// <param name="freeHoleList"></param> private void SortShellsAndHoles(IList edgeRings, IList shellList, IList freeHoleList) { for (IEnumerator it = edgeRings.GetEnumerator(); it.MoveNext();) { EdgeRing er = (EdgeRing)it.Current; er.SetInResult(); if (er.IsHole) { freeHoleList.Add(er); } else { shellList.Add(er); } } }
} // private void PlacePolygonHoles( EdgeRing shell, ArrayList minEdgeRings ) /// <summary> /// 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. /// </summary> /// <param name="edgeRings"></param> /// <param name="shellList"></param> /// <param name="freeHoleList"></param> private void SortShellsAndHoles(ArrayList edgeRings, ref ArrayList shellList, ref ArrayList freeHoleList) { foreach (object obj in edgeRings) { EdgeRing er = (EdgeRing)obj; er.SetInResult(); if (er.IsHole) { freeHoleList.Add(er); } else { shellList.Add(er); } } // foreach ( object obj in edgeRings ) } // private void SortShellsAndHoles(ArrayList edgeRings, ArrayList shellList, ArrayList freeHoleList)