Ejemplo n.º 1
0
        internal MetroGraphData(EdgeGeometry[] regularEdges,
                                RectangleNode <Polyline> looseTree, RectangleNode <Polyline> tightTree,
                                BundlingSettings bundlingSettings, Cdt cdt,
                                Dictionary <EdgeGeometry, Set <Polyline> > edgeLooseEnterable, Dictionary <EdgeGeometry, Set <Polyline> > edgeTightEnterable, Func <Port, Polyline> loosePolylineOfPort)
        {
            //Debug.Assert(cdt != null);
            this.regularEdges = regularEdges;
            if (cdt != null)
            {
                Cdt = cdt;
            }
            else
            {
                Cdt = BundleRouter.CreateConstrainedDelaunayTriangulation(looseTree);
            }

            EdgeLooseEnterable  = edgeLooseEnterable;
            EdgeTightEnterable  = edgeTightEnterable;
            LoosePolylineOfPort = loosePolylineOfPort;

            looseIntersections = new Intersections(this, bundlingSettings, looseTree, station => station.EnterableLoosePolylines);
            tightIntersections = new Intersections(this, bundlingSettings, tightTree, station => station.EnterableTightPolylines);
            cdtIntersections   = new CdtIntersections(this, bundlingSettings);

            Initialize(false);
        }
        internal MetroGraphData(EdgeGeometry[] regularEdges,
            RectangleNode<Polyline> looseTree, RectangleNode<Polyline> tightTree,
            BundlingSettings bundlingSettings, Cdt cdt,
            Dictionary<EdgeGeometry, Set<Polyline>> edgeLooseEnterable, Dictionary<EdgeGeometry, Set<Polyline>> edgeTightEnterable, Func<Port, Polyline> loosePolylineOfPort) {
            //Debug.Assert(cdt != null);
            this.regularEdges = regularEdges;
            if (cdt != null)
                Cdt = cdt;
            else
                Cdt = BundleRouter.CreateConstrainedDelaunayTriangulation(looseTree);

            EdgeLooseEnterable = edgeLooseEnterable;
            EdgeTightEnterable = edgeTightEnterable;
            LoosePolylineOfPort = loosePolylineOfPort;

            looseIntersections = new Intersections(this, bundlingSettings, looseTree, station => station.EnterableLoosePolylines);
            tightIntersections = new Intersections(this, bundlingSettings, tightTree, station => station.EnterableTightPolylines);
            cdtIntersections = new CdtIntersections(this, bundlingSettings);

            Initialize(false);
        }