|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.planargraph.GraphComponent
com.vividsolutions.jts.planargraph.Node
A node in a PlanarGraph
is a location where 0 or more Edge
s
meet. A node is connected to each of its incident Edges via an outgoing
DirectedEdge. Some clients using a PlanarGraph
may want to
subclass Node
to add their own application-specific
data and methods.
Field Summary | |
protected DirectedEdgeStar |
deStar
The collection of DirectedEdges that leave this Node |
protected Coordinate |
pt
The location of this Node |
Fields inherited from class com.vividsolutions.jts.planargraph.GraphComponent |
isMarked, isVisited |
Constructor Summary | |
Node(Coordinate pt)
Constructs a Node with the given location. |
|
Node(Coordinate pt,
DirectedEdgeStar deStar)
Constructs a Node with the given location and collection of outgoing DirectedEdges. |
Method Summary | |
void |
addOutEdge(DirectedEdge de)
Adds an outgoing DirectedEdge to this Node. |
Coordinate |
getCoordinate()
Returns the location of this Node. |
int |
getDegree()
Returns the number of edges around this Node. |
static java.util.Collection |
getEdgesBetween(Node node0,
Node node1)
Returns all Edges that connect the two nodes (which are assumed to be different). |
int |
getIndex(Edge edge)
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis. |
DirectedEdgeStar |
getOutEdges()
Returns the collection of DirectedEdges that leave this Node. |
Methods inherited from class com.vividsolutions.jts.planargraph.GraphComponent |
isMarked, isVisited, setMarked, setVisited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Coordinate pt
protected DirectedEdgeStar deStar
Constructor Detail |
public Node(Coordinate pt)
public Node(Coordinate pt, DirectedEdgeStar deStar)
Method Detail |
public static java.util.Collection getEdgesBetween(Node node0, Node node1)
public Coordinate getCoordinate()
public void addOutEdge(DirectedEdge de)
public DirectedEdgeStar getOutEdges()
public int getDegree()
public int getIndex(Edge edge)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |