public bool SharesCorner(VEdge lastEdge, out Corner sharedCorner) { if (lastEdge == this) { throw new System.Exception("Trying to find shared corner with self"); } sharedCorner = null; if (lastEdge.Contains(start)) { sharedCorner = start; } else if (lastEdge.Contains(end)) { sharedCorner = end; } return(sharedCorner != null); }
public List <Polygon> GetSharedPolygons(VEdge edge) { List <Polygon> shared = new List <Polygon>(); foreach (Polygon poly in polygons) { if (edge.Contains(poly)) { shared.Add(poly); } } return(shared); }