public class EdgeEnd extends Objectimplements Comparable
| Modifier and Type | Field and Description |
|---|---|
protected Edge |
edge
|
protected Label |
label
|
| Modifier | Constructor and Description |
|---|---|
protected |
EdgeEnd(Edge
|
|
EdgeEnd(Edge
|
|
EdgeEnd(Edge
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareDirection(EdgeEnd
Implements the total order relation:
|
int |
compareTo(Object
|
void |
computeLabel(BoundaryNodeRule
|
Coordinate |
getCoordinate()
|
Coordinate |
getDirectedCoordinate()
|
double |
getDx()
|
double |
getDy()
|
Edge |
getEdge()
|
Label |
getLabel()
|
Node |
getNode()
|
int |
getQuadrant()
|
protected void |
init(Coordinate
|
void |
print(PrintStream
|
void |
setNode(Node
|
protected EdgeEnd(Edgeedge)
public EdgeEnd(Edgeedge, Coordinate p0, Coordinate p1)
public EdgeEnd(Edgeedge, Coordinate p0, Coordinate p1, Label label)
protected void init(Coordinatep0, Coordinate p1)
public EdgegetEdge()
public LabelgetLabel()
public CoordinategetCoordinate()
public CoordinategetDirectedCoordinate()
public int getQuadrant()
public double getDx()
public double getDy()
public void setNode(Nodenode)
public NodegetNode()
public int compareTo(Objectobj)
public int compareDirection(EdgeEnde)
a has a greater angle with the positive x-axis than b
Using the obvious algorithm of simply computing the angle is not robust, since the angle calculation is obviously susceptible to roundoff. A robust algorithm is: - first compare the quadrant. If the quadrants are different, it it trivial to determine which vector is "greater". - if the vectors lie in the same quadrant, the computeOrientation function can be used to decide the relative orientation of the vectors.
public void computeLabel(BoundaryNodeRuleboundaryNodeRule)
public void print(PrintStreamout)