public class OrthogonalEdgeRouter extends AbstractEdgeRouter
| Modifier and Type | Class and Description |
|---|---|
static class |
OrthogonalEdgeRouter.Line |
AbstractEdgeRouter.RoundedPathMaker, AbstractEdgeRouter.SimplePathMaker| Modifier and Type | Field and Description |
|---|---|
static int |
OBSTACLE_PAD |
| Constructor and Description |
|---|
OrthogonalEdgeRouter()
Create a new edge router for a fixed scene of rectangles.
|
| Modifier and Type | Method and 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 Graph
|
void |
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.
|
newPathMaker, route, route, routeAllpublic static final int OBSTACLE_PAD
public OrthogonalEdgeRouter()
protected java.awt.Point getBlockLocation(java.util.UUID id)
getBlockLocation in class AbstractEdgeRouterpublic void setup(java.util.Map<java.util.UUID,java.awt.Rectangle> rectangles)
protected java.util.List<java.awt.Point> route(java.awt.Point start,
java.awt.Point end,
java.awt.Point trueStart,
java.awt.Point trueEnd)
AbstractEdgeRouterroute in class AbstractEdgeRouterpublic java.lang.Double getCost()
public org.jgrapht.graph.SimpleGraph<java.awt.Point,OrthogonalEdgeRouter.Line> getGraph()
public void paintDebug(java.awt.Graphics2D g)
EdgeRouter