/// <summary> /// Completes the building of the input subgraphs by depth-labelling them, /// and adds them to the <see cref="PolygonBuilder" />. /// The subgraph list must be sorted in rightmost-coordinate order. /// </summary> /// <param name="subgraphList">The subgraphs to build.</param> /// <param name="polyBuilder">The PolygonBuilder which will build the final polygons.</param> private void BuildSubgraphs(IList subgraphList, PolygonBuilder polyBuilder) { IList processedGraphs = new ArrayList(); foreach (object obj in subgraphList) { BufferSubgraph subgraph = (BufferSubgraph)obj; ICoordinate p = subgraph.RightMostCoordinate; SubgraphDepthLocater locater = new SubgraphDepthLocater(processedGraphs); int outsideDepth = locater.GetDepth(p); subgraph.ComputeDepth(outsideDepth); subgraph.FindResultEdges(); processedGraphs.Add(subgraph); polyBuilder.Add(subgraph.DirectedEdges, subgraph.Nodes); } }
/// <summary> /// Completes the building of the input subgraphs by depth-labelling them, /// and adds them to the <see cref="PolygonBuilder" />. /// The subgraph list must be sorted in rightmost-coordinate order. /// </summary> /// <param name="subgraphList">The subgraphs to build.</param> /// <param name="polyBuilder">The PolygonBuilder which will build the final polygons.</param> private void BuildSubgraphs(IList subgraphList, PolygonBuilder polyBuilder) { IList processedGraphs = new ArrayList(); foreach(object obj in subgraphList) { BufferSubgraph subgraph = (BufferSubgraph)obj; ICoordinate p = subgraph.RightMostCoordinate; SubgraphDepthLocater locater = new SubgraphDepthLocater(processedGraphs); int outsideDepth = locater.GetDepth(p); subgraph.ComputeDepth(outsideDepth); subgraph.FindResultEdges(); processedGraphs.Add(subgraph); polyBuilder.Add(subgraph.DirectedEdges, subgraph.Nodes); } }