17 #ifndef GEOS_PLANARGRAPH_NODE_H
18 #define GEOS_PLANARGRAPH_NODE_H
20 #include <geos/export.h>
22 #include <geos/planargraph/GraphComponent.h>
23 #include <geos/planargraph/DirectedEdgeStar.h>
24 #include <geos/geom/Coordinate.h>
28 namespace planargraph {
35 namespace planargraph {
66 static std::vector<Edge*>* getEdgesBetween(
Node *node0,
116 return deStar->getDegree();
125 return deStar->getIndex(edge);
131 std::ostream&
operator<<(std::ostream& os,
const Node& n);
140 #endif // GEOS_PLANARGRAPH_NODE_H
geom::Coordinate & getCoordinate()
Returns the location of this Node.
Definition: planargraph/Node.h:94
int getIndex(Edge *edge)
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the po...
Definition: planargraph/Node.h:124
DirectedEdgeStar * deStar
The collection of DirectedEdges that leave this Node.
Definition: planargraph/Node.h:53
A sorted collection of DirectedEdge which leave a Node in a PlanarGraph.
Definition: planargraph/DirectedEdgeStar.h:47
Node(const geom::Coordinate &newPt)
Constructs a Node with the given location.
Definition: planargraph/Node.h:70
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:61
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:47
size_t getDegree() const
Returns the number of edges around this Node.
Definition: planargraph/Node.h:115
Node(geom::Coordinate &newPt, DirectedEdgeStar *newDeStar)
Constructs a Node with the given location and collection of outgoing DirectedEdges. Takes ownership of the given DirectedEdgeStar!!
Definition: planargraph/Node.h:85
DirectedEdgeStar * getOutEdges()
Returns the collection of DirectedEdges that leave this Node.
Definition: planargraph/Node.h:109
std::ostream & operator<<(std::ostream &os, const Edge &n)
Print a Edge.
Represents an undirected edge of a PlanarGraph.
Definition: planargraph/Edge.h:55
void addOutEdge(DirectedEdge *de)
Adds an outgoing DirectedEdge to this Node.
Definition: planargraph/Node.h:101
geom::Coordinate pt
The location of this Node.
Definition: planargraph/Node.h:50
The base class for all graph component classes.
Definition: planargraph/GraphComponent.h:47
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:46