Class GridRouter
Routing based on the A* algorithm.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public sealed class GridRouter : RoutingBase, IRouter
Constructors
GridRouter(IGraphInternal)
Initializes a new instance of the GridRouter class.
Declaration
public GridRouter(IGraphInternal diagram)
Parameters
IGraphInternal
diagram
The diagram. |
GridRouter(IGraphInternal, Func<Point, Boolean>)
Initializes a new instance of the GridRouter class.
Declaration
public GridRouter(IGraphInternal diagram, Func<Point, bool> locationDelegate)
Parameters
IGraphInternal
diagram
The diagram. |
System.Func<System.Windows.Point, System.Boolean>
locationDelegate
The location delegate. |
Properties
Cutoff
This is a cutoff for the A*-search and represents the buffer of points.
Declaration
public static int Cutoff { get; set; }
Property Value
System.Int32
|
Methods
FindDuplicate(IEnumerable<Point>)
Finds the duplicate in the list of points which leads to loops in the paths.
Declaration
public static Point? FindDuplicate(IEnumerable<Point> source)
Parameters
System.Collections.Generic.IEnumerable<System.Windows.Point>
source
The source. |
Returns
System.Nullable<System.Windows.Point>
|
GetRoutePoints(IConnection, Boolean)
Gets the route points.
Declaration
public override IList<Point> GetRoutePoints(IConnection connection, bool showLastLine = true)
Parameters
IConnection
connection
The connection. |
System.Boolean
showLastLine
If set to |
Returns
System.Collections.Generic.IList<System.Windows.Point>
|
Overrides
RemoveLoops(IList<Point>)
Removes the loops in the point list.
Declaration
public static IList<Point> RemoveLoops(IList<Point> points)
Parameters
System.Collections.Generic.IList<System.Windows.Point>
points
The points. |
Returns
System.Collections.Generic.IList<System.Windows.Point>
|
Route(Point, Point)
Returns null, if no path is found. Start- and End-Node are included in returned path.
Declaration
public IList<Point> Route(Point startPoint, Point endPoint)
Parameters
System.Windows.Point
startPoint
|
System.Windows.Point
endPoint
|
Returns
System.Collections.Generic.IList<System.Windows.Point>
|