private void IntersectScanSegments() { var si = new SegmentIntersector(); this.VisibilityGraph = si.Generate(HorizontalScanSegments.Segments, VerticalScanSegments.Segments); si.RemoveSegmentsWithNoVisibility(HorizontalScanSegments, VerticalScanSegments); HorizontalScanSegments.DevTraceVerifyVisibility(); VerticalScanSegments.DevTraceVerifyVisibility(); }
/// <summary> /// Generate the visibility graph along which edges will be routed. /// </summary> /// <returns></returns> internal override void GenerateVisibilityGraph() { this.AccumulateVertexCoords(); this.CreateSegmentVectorsAndPopulateCoordinateMaps(); this.RunScanLineToCreateSegmentsAndBoundingBoxSteinerPoints(); this.GenerateSparseIntersectionsFromVertexPoints(); this.CreateScanSegmentTrees(); HorizontalScanSegments.DevTraceVerifyVisibility(); VerticalScanSegments.DevTraceVerifyVisibility(); Debug_AssertGraphIsRectilinear(VisibilityGraph, ObstacleTree); this.Cleanup(); }
/// <summary> /// Generate the visibility graph along which edges will be routed. /// </summary> /// <returns></returns> internal override void GenerateVisibilityGraph() { if (null == ObstacleTree.Root) { return; } // This will initialize events and call ProcessEvents which will call our specific functionality // to create scan segments. base.GenerateVisibilityGraph(); // Merge any ScanSegments that share intervals. HorizontalScanSegments.MergeSegments(); VerticalScanSegments.MergeSegments(); // Done now with the ScanSegment generation; intersect them to create the VisibilityGraph. IntersectScanSegments(); Debug_AssertGraphIsRectilinear(VisibilityGraph, ObstacleTree); }