|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jwo.landserf.structure.Edge
Stores a 2d topological directional edge used for connecting 2d or higher dimensional features. Edge consists of 2 nodes P1 and P2 orderd P1->P2. Adapted from Zhao and Saalfeld, 1996.
Node
,
Triangle
,
Serialized FormField Summary | |
static int |
ALIGNED
Indicates location aligned with directed edge. |
static int |
LEFT
Indicates location to the left of directed edge. |
static int |
RIGHT
Indicates location to the right of directed edge. |
Constructor Summary | |
Edge(Node p1,
Node p2)
Creates an edge from the two given nodes. |
Method Summary | |
void |
calcEquation()
Calculates the equation of the straight line that this edge forms a part of. |
int |
calcSide(Node node)
Determines where the edge is in relation to a given node. |
Edge |
getInvEdge()
Returns this edge's inverse (P2->P1). |
float |
getLength()
Reports the 2d length of the edge. |
Edge |
getNextEdge()
Returns the next anticlockwise edge in the sequence. |
Edge |
getNextHullEdge()
Returns the next convex hull edge in the sequence. |
Node |
getP1()
Returns the first point associated with this edge. |
Node |
getP2()
Returns the second point associated with this edge. |
Triangle |
getTriang()
Returns the triangle containing this edge. |
float |
getVersion()
Reports the version of the object. |
void |
linkSymm(Edge edge)
Creates a link to the symmetrical inverse of the supplied edge. |
Edge |
makeSymm()
Creates a symmetrical inverse of this edge. |
Edge |
mostLeft()
Traverses edge network and returns the left-most edge. |
Edge |
mostRight()
Traverses edge network and returns the right-most edge. |
void |
p1ToEdge()
Sets this edge to be the one pointed to by the first node. |
void |
setInvEdge(Edge edge)
Sets the inverse (P2->P1) edge. |
void |
setNextEdge(Edge edge)
Sets the next edge in the sequence. |
void |
setNextHullEdge(Edge edge)
Sets the next convex hull edge in the sequence. |
void |
setTriang(Triangle triangle)
Sets the triangle of which this edge forms a part. |
void |
setVersion(float version)
Sets the version number of this object. |
String |
toString()
Reports the coordinates of this edge. |
void |
update(Node p1,
Node p2)
Updates the topology and equation representing this edge. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int RIGHT
public static final int ALIGNED
public static final int LEFT
Constructor Detail |
public Edge(Node p1, Node p2)
p1
- First node of edge.p2
- Second node of edge.Method Detail |
public void update(Node p1, Node p2)
p1
- First node of edge.p2
- Second node of edge.public Edge makeSymm()
public void linkSymm(Edge edge)
edge
- Symmetrical inverse of this edge.public int calcSide(Node node)
node
- Node to test with respect to this edge.
public void calcEquation()
public void p1ToEdge()
public Edge mostLeft()
public Edge mostRight()
public String toString()
toString
in class Object
public Node getP1()
public Node getP2()
public float getLength()
public Edge getNextEdge()
public void setNextEdge(Edge edge)
edge
- Edge to add to sequence.public Edge getInvEdge()
public void setInvEdge(Edge edge)
edge
- Inverse of this edge.public Edge getNextHullEdge()
public void setNextHullEdge(Edge edge)
edge
- Next convex hull edge.public Triangle getTriang()
public void setTriang(Triangle triangle)
triangle
- Triangle that this edge belongs to.public float getVersion()
public void setVersion(float version)
version
- Version number of this object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |