internal void AddOobEdgesFromGraphCorner(TransientGraphUtility transUtil, Point cornerPoint) { Directions dirs = PointComparer.GetDirections(cornerPoint, Vertex.Point); VisibilityVertex cornerVertex = transUtil.VisGraph.FindVertex(cornerPoint); // For waypoints we want to be able to enter in both directions. transUtil.ConnectVertexToTargetVertex(cornerVertex, this.Vertex, dirs & (Directions.North | Directions.South), ScanSegment.NormalWeight); transUtil.ConnectVertexToTargetVertex(cornerVertex, this.Vertex, dirs & (Directions.East | Directions.West), ScanSegment.NormalWeight); }
internal void ExtendEdgeChain(TransientGraphUtility transUtil, VisibilityVertex paddedBorderVertex , VisibilityVertex targetVertex, Rectangle limitRect, bool routeToCenter) { // Extend the edge chain to the opposite side of the limit rectangle. transUtil.ExtendEdgeChain(targetVertex, limitRect, this.MaxVisibilitySegment, this.pointAndCrossingsList, this.IsOverlapped); // In order for Nudger to be able to map from the (near-) endpoint vertex to a PortEntry, we must // always connect a vertex at UnpaddedBorderIntersect to the paddedBorderVertex, even if routeToCenter. var unpaddedBorderVertex = transUtil.FindOrAddVertex(UnpaddedBorderIntersect); transUtil.FindOrAddEdge(unpaddedBorderVertex, paddedBorderVertex, this.unpaddedToPaddedBorderWeight); if (routeToCenter) { // Link the CenterVertex to the vertex at UnpaddedBorderIntersect. transUtil.ConnectVertexToTargetVertex(ObstaclePort.CenterVertex, unpaddedBorderVertex, OutwardDirection, InitialWeight); } }
internal void AddOobEdgesFromGraphCorner(TransientGraphUtility transUtil, Point cornerPoint) { Directions dirs = PointComparer.GetDirections(cornerPoint, Vertex.Point); VisibilityVertex cornerVertex = transUtil.VisGraph.FindVertex(cornerPoint); // For waypoints we want to be able to enter in both directions. transUtil.ConnectVertexToTargetVertex(cornerVertex, this.Vertex, dirs & (Directions.North | Directions.South), ScanSegment.NormalWeight); transUtil.ConnectVertexToTargetVertex(cornerVertex, this.Vertex, dirs & (Directions.East | Directions.West), ScanSegment.NormalWeight); }
internal void ExtendEdgeChain(TransientGraphUtility transUtil, VisibilityVertex paddedBorderVertex , VisibilityVertex targetVertex, Rectangle limitRect, bool routeToCenter) { // Extend the edge chain to the opposite side of the limit rectangle. transUtil.ExtendEdgeChain(targetVertex, limitRect, this.MaxVisibilitySegment, this.pointAndCrossingsList, this.IsOverlapped); // In order for Nudger to be able to map from the (near-) endpoint vertex to a PortEntry, we must // always connect a vertex at UnpaddedBorderIntersect to the paddedBorderVertex, even if routeToCenter. var unpaddedBorderVertex = transUtil.FindOrAddVertex(UnpaddedBorderIntersect); transUtil.FindOrAddEdge(unpaddedBorderVertex, paddedBorderVertex, this.unpaddedToPaddedBorderWeight); if (routeToCenter) { // Link the CenterVertex to the vertex at UnpaddedBorderIntersect. transUtil.ConnectVertexToTargetVertex(ObstaclePort.CenterVertex, unpaddedBorderVertex, OutwardDirection, InitialWeight); } }