java.lang.Object
com.port80.graph.dot.impl.ShortestPath
- public class ShortestPath
- extends java.lang.Object
|
Method Summary |
private static boolean |
between(DotPoint a,
DotPoint b,
DotPoint c)
|
private static int |
ccw(DotPoint p1,
DotPoint p2,
DotPoint p3)
|
private void |
connectTriangles(ShortestPath.Triangle t1,
ShortestPath.Triangle t2)
|
static int |
find(DotPolyline bound,
DotPoint[] endpts,
DotPolyline ret)
|
private static boolean |
intersects(DotPoint a,
DotPoint b,
DotPoint c,
DotPoint d)
|
private boolean |
isDiagonal(int i,
int ip2,
ShortestPath.PointLink[] pts,
int max)
|
private void |
loadTriangle(ShortestPath.PointLink a,
ShortestPath.PointLink b,
ShortestPath.PointLink c)
|
private boolean |
markTrianglePath(ShortestPath.Triangle[] a,
int first,
int last)
Find and mark triangle path from 'first' to 'last'. |
int |
shortestPath(DotPolyline bound,
DotPoint[] endpts,
DotPolyline ret)
|
private void |
triangulate(ShortestPath.PointLink[] pts,
int max)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
ISCCW
private static final int ISCCW
- See Also:
- Constant Field Values
ISCW
private static final int ISCW
- See Also:
- Constant Field Values
ISON
private static final int ISON
- See Also:
- Constant Field Values
DQ_FRONT
private static final int DQ_FRONT
- See Also:
- Constant Field Values
DQ_BACK
private static final int DQ_BACK
- See Also:
- Constant Field Values
ptList
private ShortestPath.PointLink[] ptList
triangles
private ShortestPath.Triangle[] triangles
nTri
private int nTri
dq
private ShortestPath.Dequeue dq
ShortestPath
public ShortestPath()
find
public static int find(DotPolyline bound,
DotPoint[] endpts,
DotPolyline ret)
shortestPath
public int shortestPath(DotPolyline bound,
DotPoint[] endpts,
DotPolyline ret)
triangulate
private void triangulate(ShortestPath.PointLink[] pts,
int max)
isDiagonal
private boolean isDiagonal(int i,
int ip2,
ShortestPath.PointLink[] pts,
int max)
loadTriangle
private void loadTriangle(ShortestPath.PointLink a,
ShortestPath.PointLink b,
ShortestPath.PointLink c)
connectTriangles
private void connectTriangles(ShortestPath.Triangle t1,
ShortestPath.Triangle t2)
markTrianglePath
private boolean markTrianglePath(ShortestPath.Triangle[] a,
int first,
int last)
- Find and mark triangle path from 'first' to 'last'. Search in
all direction until last is reached. Backtrace to 'first',
and unmark branches that do not lead to 'last'.
ccw
private static int ccw(DotPoint p1,
DotPoint p2,
DotPoint p3)
intersects
private static boolean intersects(DotPoint a,
DotPoint b,
DotPoint c,
DotPoint d)
between
private static boolean between(DotPoint a,
DotPoint b,
DotPoint c)