// Adds the polygon's points to the first point group that shares a point with the polygon.
 // If any other groups share a point with the polygon, those groups are merged into the first group as well,
 // and are removed from their previous positions in the list.
 // Returns the index of the merged (or new) group.
 public static int MergeIntoPointGroups(this DTPolygon poly, List <HashSet <Vector2> > pointGroups)
 {
     // Don't bother checking holes
     return(poly.Contour.MergeIntoPointGroups(pointGroups));
 }
 // Returns the index of the first group that shares a point with this polygon.
 public static int GetFirstPointGroupIndex(this DTPolygon poly, IDictionary <Vector2, int> pointToGroup)
 {
     // Don't bother checking hole points
     return(poly.Contour.GetFirstPointGroupIndex(pointToGroup));
 }
 // Returns true given group shares a point with this polygon.
 public static bool BelongsToPointGroup(this DTPolygon poly, HashSet <Vector2> points)
 {
     // Don't bother checking holes
     return(poly.Contour.BelongsToPointGroup(points));
 }
 // Returns the index of the first group that shares a point with this polygon.
 public static int GetFirstPointGroupIndex(this DTPolygon poly, IEnumerable <ISet <Vector2> > pointGroups)
 {
     // Don't bother checking hole points
     return(poly.Contour.GetFirstPointGroupIndex(pointGroups));
 }