Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.graph.dot.impl
Class ShortestPath  view ShortestPath download ShortestPath.java

java.lang.Object
  extended bycom.port80.graph.dot.impl.ShortestPath

public class ShortestPath
extends java.lang.Object


Nested Class Summary
(package private) static class ShortestPath.Dequeue
           
(package private) static class ShortestPath.PointLink
           
(package private) static class ShortestPath.Triangle
           
(package private) static class ShortestPath.TriEdge
           
 
Field Summary
private static boolean DEBUG
           
private  ShortestPath.Dequeue dq
           
private static int DQ_BACK
           
private static int DQ_FRONT
           
private static int ISCCW
           
private static int ISCW
           
private static int ISON
           
private static java.lang.String NAME
           
private  int nTri
           
private  ShortestPath.PointLink[] ptList
           
private  ShortestPath.Triangle[] triangles
           
 
Constructor Summary
ShortestPath()
           
 
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
 

Field Detail

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
Constructor Detail

ShortestPath

public ShortestPath()
Method Detail

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)