Table of Contents

Class DirectRouter

Namespace
FlowGraph.Core.Routing
Assembly
FlowGraph.Core.dll

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

DirectRouter

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

node Node
portId string
isOutput bool
context EdgeRoutingContext

Returns

Point

Route(EdgeRoutingContext, Edge)

Calculates waypoints for an edge to route around obstacles.

public IReadOnlyList<Point> Route(EdgeRoutingContext context, Edge edge)

Parameters

context EdgeRoutingContext

The routing context containing graph information.

edge Edge

The edge to route.

Returns

IReadOnlyList<Point>

A list of waypoints (including start and end points).