/// <summary> /// Removes a point from the polygon. Note this can be a somewhat expensive operation /// as it must recalculate the bounding area from scratch. /// </summary> /// <param name="p"></param> public void RemovePoint(PolygonPoint p) { PolygonPoint next = p.Next; PolygonPoint prev = p.Previous; prev.Next = next; next.Previous = prev; MPoints.Remove(p); BoundingBox = new Rect2D(); foreach (var point2D in MPoints) { BoundingBox = BoundingBox.AddPoint(point2D); } }