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 |
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 |
UNDEFINED
public static final double UNDEFINED
quadrant
public int quadrant
ArcEdge
public ArcEdge(Edge e)
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