Class OrthogonalEdgeRouter
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.blockandconnector.routing.AbstractEdgeRouter
-
- com.inductiveautomation.ignition.designer.blockandconnector.routing.OrthogonalEdgeRouter
-
- All Implemented Interfaces:
EdgeRouter
public class OrthogonalEdgeRouter extends AbstractEdgeRouter
This edge router uses an orthogonal edge routing algorithm to route edges between blocks at right angles. See: http://ww2.cs.mu.oz.au/~pjs/papers/gd09.pdf
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OrthogonalEdgeRouter.Line
-
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.blockandconnector.routing.AbstractEdgeRouter
AbstractEdgeRouter.RoundedPathMaker, AbstractEdgeRouter.SimplePathMaker
-
-
Field Summary
Fields Modifier and Type Field Description static int
OBSTACLE_PAD
-
Constructor Summary
Constructors Constructor Description OrthogonalEdgeRouter()
Create a new edge router for a fixed scene of rectangles.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Point
getBlockLocation(java.util.UUID id)
java.lang.Double
getCost()
org.jgrapht.graph.SimpleGraph<java.awt.Point,OrthogonalEdgeRouter.Line>
getGraph()
Return the most recent Orthogonal Visibility Graphvoid
paintDebug(java.awt.Graphics2D g)
Optional.protected java.util.List<java.awt.Point>
route(java.awt.Point start, java.awt.Point end, java.awt.Point trueStart, java.awt.Point trueEnd)
Find the route from start to end.void
setup(java.util.Map<java.util.UUID,java.awt.Rectangle> rectangles)
Resets this edge router's set of rectangles, which are the obstacles for otho routing.-
Methods inherited from class com.inductiveautomation.ignition.designer.blockandconnector.routing.AbstractEdgeRouter
newPathMaker, route, route, routeAll
-
-
-
-
Field Detail
-
OBSTACLE_PAD
public static final int OBSTACLE_PAD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBlockLocation
protected java.awt.Point getBlockLocation(java.util.UUID id)
- Specified by:
getBlockLocation
in classAbstractEdgeRouter
-
setup
public void setup(java.util.Map<java.util.UUID,java.awt.Rectangle> rectangles)
Resets this edge router's set of rectangles, which are the obstacles for otho routing.
-
route
protected java.util.List<java.awt.Point> route(java.awt.Point start, java.awt.Point end, java.awt.Point trueStart, java.awt.Point trueEnd)
Description copied from class:AbstractEdgeRouter
Find the route from start to end. The "true" start and end points are provided for reference but should not be part of the route, and may be null depending on the type of route being created. (These points will be the "anchor" points whereas the start and end points are the lead points)- Specified by:
route
in classAbstractEdgeRouter
-
getCost
public java.lang.Double getCost()
-
getGraph
public org.jgrapht.graph.SimpleGraph<java.awt.Point,OrthogonalEdgeRouter.Line> getGraph()
Return the most recent Orthogonal Visibility Graph
-
paintDebug
public void paintDebug(java.awt.Graphics2D g)
Description copied from interface:EdgeRouter
Optional. An opportunity to paint debug info. Turned on with -DEdgeRouter.DebugPaint=true
-
-