public class VisEdge
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected VisVertex |
mBack |
protected Edge |
mEdge |
protected VisVertex |
mFront |
Constructor and Description |
---|
VisEdge(Edge e,
VisVertex v1,
VisVertex v2) |
Modifier and Type | Method and Description |
---|---|
VisEdge |
copy(VisVertex front,
VisVertex back)
Creates a new
VisEdge from the specified
VisVertex instances and this instance's
Edge . |
Coordinates |
getBack()
Returns the location of the first endpoint of the
Edge which
this VisEdge represents. |
Edge |
getEdge()
Returns the
Edge which this VisEdge
represents. |
Coordinates |
getFront()
Returns the location of the second endpoint of the
Edge which
this VisEdge represents. |
double |
getSquareDistance(double x,
double y)
Returns the squared distance from this edge to the point
(x,y) . |
protected Edge mEdge
protected VisVertex mFront
protected VisVertex mBack
public double getSquareDistance(double x, double y)
(x,y)
.
The default implementation takes care of a distance from a straight edge to a point;
more complex edges should have corresponding functions.public Edge getEdge()
Edge
which this VisEdge
represents.public Coordinates getFront()
Edge
which
this VisEdge
represents.public Coordinates getBack()
Edge
which
this VisEdge
represents.