internal static void SetEdgesOnLevels( LgData lgData, GeometryGraph mainGeometryGraph, LgLayoutSettings lgLayoutSettings) { var nodeZoomLevelCalculator = new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node], mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile); nodeZoomLevelCalculator.RunAfterFlow(lgData); lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos; lgData.LevelNodeCounts = nodeZoomLevelCalculator.LevelNodeCounts; }
internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels( LgData lgData, GeometryGraph mainGeometryGraph, LgLayoutSettings lgLayoutSettings) { var nodeZoomLevelCalculator = new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node], mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile); nodeZoomLevelCalculator.Run(); lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos; lgData.LevelNodeCounts = nodeZoomLevelCalculator.LevelNodeCounts; AssignEdges(lgData, nodeZoomLevelCalculator); }
internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels( LgData lgData, GeometryGraph mainGeometryGraph, LgLayoutSettings lgLayoutSettings) { var nodeZoomLevelCalculator = new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node], mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile); //jyoti this is the place where you might want to bound the theoretical zoom level nodeZoomLevelCalculator.Run(); lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos; lgData.LevelNodeCounts = nodeZoomLevelCalculator.LevelNodeCounts; AssignEdges(lgData, nodeZoomLevelCalculator); }
TileStatistic GetOrCreateTileStatistic(Point p) { Tuple <int, int> t = DeviceIndependendZoomCalculatorForNodes.PointToTuple(_geomGraph.LeftBottom, p, GetGridSize()); TileStatistic ts; if (tileTableForStatistic.TryGetValue(t, out ts)) { return(ts); } tileTableForStatistic[t] = ts = new TileStatistic { rails = 0, vertices = 0 }; return(ts); }
internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels( LgData lgData, GeometryGraph mainGeometryGraph, LgLayoutSettings lgLayoutSettings) { //fromDrawingToEdgeInfo = new Dictionary<ICurve, LgEdgeInfo>(); foreach (var connectedGraph in lgData.ConnectedGeometryGraphs) { RankTheGraph(lgData, mainGeometryGraph, connectedGraph); } UpdateRankClusters(lgData); var nodeZoomLevelCalculator = new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node], mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberNodesPerTile); nodeZoomLevelCalculator.Run(); lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos; lgData.LevelNodeCounts = nodeZoomLevelCalculator.LevelNodeCounts; RouteEdgesOnLevels(lgData, nodeZoomLevelCalculator, lgLayoutSettings, mainGeometryGraph); }