Class DirectRouter
Simple edge router that doesn't modify paths (direct connection).
public class DirectRouter : IEdgeRouter
- Inheritance
-
DirectRouter
- Implements
- Inherited Members
Properties
Instance
public static DirectRouter Instance { get; }
Property Value
Methods
GetPortPosition(Node, string?, bool, EdgeRoutingContext)
Gets the position of a port on a node. Distributes ports evenly along the node edge based on port index.
public static Point GetPortPosition(Node node, string? portId, bool isOutput, EdgeRoutingContext context)
Parameters
nodeNodeportIdstringisOutputboolcontextEdgeRoutingContext
Returns
Route(EdgeRoutingContext, Edge)
Calculates waypoints for an edge to route around obstacles.
public IReadOnlyList<Point> Route(EdgeRoutingContext context, Edge edge)
Parameters
contextEdgeRoutingContextThe routing context containing graph information.
edgeEdgeThe edge to route.
Returns
- IReadOnlyList<Point>
A list of waypoints (including start and end points).