//
// OverlapConvexHull.cs
// MSAGL class for Convex Hulls around overlapping obstacles for Rectilinear Edge Routing.
//
// Copyright Microsoft Corporation.
using System.Collections.Generic;
using System.Linq;
using Microsoft.Msagl.Core.Geometry.Curves;
namespace Microsoft.Msagl.Routing.Rectilinear {
///
/// This stores the location and type of a Port.
///
internal class OverlapConvexHull {
internal Polyline Polyline { get; private set; }
///
/// This is some arbitrary obstacle inside the convex hull so we qualify Select().Where() so we
/// don't get the CH duplicated in the scanline etc. enumerations.
///
internal Obstacle PrimaryObstacle { get; private set; }
internal List Obstacles { get; private set; }
internal OverlapConvexHull(Polyline polyline, IEnumerable obstacles) {
this.Polyline = polyline;
this.Obstacles = obstacles.ToList();
this.PrimaryObstacle = this.Obstacles[0];
Obstacle.RoundVertices(this.Polyline);
}
///
///
///
public override string ToString() {
return this.Polyline.ToString();
}
}
}