Class ArcEdge

java.lang.Object
  |
  +--java.awt.geom.Line2D
        |
        +--ArcEdge

public class ArcEdge
extends java.awt.geom.Line2D
implements java.lang.Comparable

this class holds an edge which can be comparable by the angle the line is at it is required so that you can traverse edges leaving a point in clockwise or counter-clockwise order


Inner classes inherited from class java.awt.geom.Line2D
java.awt.geom.Line2D.Double, java.awt.geom.Line2D.Float
 
Field Summary
 int quadrant
           
static double UNDEFINED
           
 
Constructor Summary
ArcEdge(Edge e)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          used to sorrt the edges clockwise
 void display(java.awt.Graphics g)
          displays the edge on the screen
 void findRatioRelativeTo(Vertex pivot)
          find the rise/run ratio relative to a pivot point
 Vertex findSharedVertex(ArcEdge e)
          find the shared vertex from one ArcEdge to another
 java.awt.geom.Rectangle2D getBounds2D()
           
 int getEndPoint()
           
 Vertex getEndVertex()
           
 Vertex getOtherVertex(Vertex v)
          after it is determined that this arcedge has a shared vertex, return the unsharded vertex
 java.awt.geom.Point2D getP1()
           
 java.awt.geom.Point2D getP2()
           
 int getStartPoint()
           
 Vertex getStartVertex()
           
 double getX1()
           
 double getX2()
           
 double getY1()
           
 double getY2()
           
 void print()
           
 void setLine(double x, double y, double z, double a)
           
 void setWeight(double w)
           
 boolean shareVertex(Edge e)
           
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final double UNDEFINED

quadrant

public int quadrant
Constructor Detail

ArcEdge

public ArcEdge(Edge e)
Method Detail

getStartPoint

public int getStartPoint()

getEndPoint

public int getEndPoint()

getX1

public double getX1()
Overrides:
getX1 in class java.awt.geom.Line2D

getY2

public double getY2()
Overrides:
getY2 in class java.awt.geom.Line2D

setLine

public void setLine(double x,
                    double y,
                    double z,
                    double a)
Overrides:
setLine in class java.awt.geom.Line2D

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Overrides:
getBounds2D in class java.awt.geom.Line2D

shareVertex

public boolean shareVertex(Edge e)

getP2

public java.awt.geom.Point2D getP2()
Overrides:
getP2 in class java.awt.geom.Line2D

getY1

public double getY1()
Overrides:
getY1 in class java.awt.geom.Line2D

getX2

public double getX2()
Overrides:
getX2 in class java.awt.geom.Line2D

getP1

public java.awt.geom.Point2D getP1()
Overrides:
getP1 in class java.awt.geom.Line2D

getStartVertex

public Vertex getStartVertex()

getEndVertex

public Vertex getEndVertex()

setWeight

public void setWeight(double w)

print

public void print()

display

public void display(java.awt.Graphics g)
displays the edge on the screen

getOtherVertex

public Vertex getOtherVertex(Vertex v)
after it is determined that this arcedge has a shared vertex, return the unsharded vertex

findSharedVertex

public Vertex findSharedVertex(ArcEdge e)
find the shared vertex from one ArcEdge to another

compareTo

public int compareTo(java.lang.Object o)
used to sorrt the edges clockwise
Specified by:
compareTo in interface java.lang.Comparable

findRatioRelativeTo

public void findRatioRelativeTo(Vertex pivot)
find the rise/run ratio relative to a pivot point