16 #ifndef GEOS_PLANARGRAPH_DIRECTEDEDGE_H
17 #define GEOS_PLANARGRAPH_DIRECTEDEDGE_H
19 #include <geos/export.h>
20 #include <geos/planargraph/GraphComponent.h>
21 #include <geos/geom/Coordinate.h>
28 namespace planargraph {
35 namespace planargraph {
52 typedef std::list<DirectedEdge*> NonConstList;
53 typedef std::list<const DirectedEdge*> ConstList;
54 typedef std::vector<DirectedEdge*> NonConstVect;
67 typedef std::vector<const DirectedEdge*> ConstVect;
68 typedef std::vector<DirectedEdge*> Vect;
80 std::vector<DirectedEdge*>& dirEdges);
90 static void toEdges(std::vector<DirectedEdge*>& dirEdges,
91 std::vector<Edge*>& parentEdges);
109 bool newEdgeDirection);
239 #endif // GEOS_PLANARGRAPH_DIRECTEDEDGE_H
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:46
void setEdge(Edge *newParentEdge)
Associates this DirectedEdge with an Edge (possibly null, indicating no associated Edge).
const geom::Coordinate & getDirectionPt() const
Returns a point to which an imaginary line is drawn from the from-node to specify this DirectedEdge's...
int compareDirection(const DirectedEdge *e) const
Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b",...
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26
bool pdeLessThan(DirectedEdge *first, DirectedEdge *second)
Strict Weak comparator function for containers.
bool getEdgeDirection() const
Returns whether the direction of the parent Edge (if any) is the same as that of this Directed Edge.
Node * getFromNode() const
Returns the node from which this DirectedEdge leaves.
The base class for all graph component classes.
Definition: planargraph/GraphComponent.h:46
static std::vector< Edge * > * toEdges(std::vector< DirectedEdge * > &dirEdges)
Returns a List containing the parent Edge (possibly null) for each of the given DirectedEdges.
int getQuadrant() const
Returns 0, 1, 2, or 3, indicating the quadrant in which this DirectedEdge's orientation lies.
Edge * getEdge() const
Returns this DirectedEdge's parent Edge, or null if it has none.
double getAngle() const
Returns the angle that the start of this DirectedEdge makes with the positive x-axis,...
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
int compareTo(const DirectedEdge *obj) const
Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b",...
std::string print() const
Prints a detailed string representation of this DirectedEdge to the given PrintStream.
std::ostream & operator<<(std::ostream &, const DirectedEdge &)
Output operator.
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:45
DirectedEdge(Node *newFrom, Node *newTo, const geom::Coordinate &directionPt, bool newEdgeDirection)
Constructs a DirectedEdge connecting the from node to the to node.
Represents an undirected edge of a PlanarGraph.
Definition: planargraph/Edge.h:54
geom::Coordinate & getCoordinate() const
Returns the coordinate of the from-node.
void setSym(DirectedEdge *newSym)
Sets this DirectedEdge's symmetric DirectedEdge, which runs in the opposite direction.
DirectedEdge * getSym() const
Returns the symmetric DirectedEdge – the other DirectedEdge associated with this DirectedEdge's paren...
static void toEdges(std::vector< DirectedEdge * > &dirEdges, std::vector< Edge * > &parentEdges)
Add parent Edge (possibly null) of each of the given DirectedEdges to the given parentEdges vector.
Node * getToNode() const
Returns the node to which this DirectedEdge goes.