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 {
46 class GEOS_DLL DirectedEdge:
public GraphComponent {
50 friend std::ostream&
operator << (std::ostream&,
const DirectedEdge&);
52 typedef std::list<DirectedEdge*> NonConstList;
53 typedef std::list<const DirectedEdge*> ConstList;
54 typedef std::vector<DirectedEdge*> NonConstVect;
60 geom::Coordinate p0, p1;
67 typedef std::vector<const DirectedEdge*> ConstVect;
68 typedef std::vector<DirectedEdge*> Vect;
79 static std::vector<Edge*>* toEdges(
80 std::vector<DirectedEdge*>& dirEdges);
90 static void toEdges(std::vector<DirectedEdge*>& dirEdges,
91 std::vector<Edge*>& parentEdges);
107 DirectedEdge(Node* newFrom, Node* newTo,
108 const geom::Coordinate& directionPt,
109 bool newEdgeDirection);
115 Edge* getEdge()
const;
121 void setEdge(Edge* newParentEdge);
127 int getQuadrant()
const;
133 const geom::Coordinate& getDirectionPt()
const;
139 bool getEdgeDirection()
const;
144 Node* getFromNode()
const;
149 Node* getToNode()
const;
155 geom::Coordinate& getCoordinate()
const;
162 double getAngle()
const;
169 DirectedEdge* getSym()
const;
176 void setSym(DirectedEdge* newSym);
197 int compareTo(
const DirectedEdge* obj)
const;
218 int compareDirection(
const DirectedEdge* e)
const;
225 std::string print()
const;
230 bool pdeLessThan(DirectedEdge* first, DirectedEdge* second);
233 std::ostream&
operator << (std::ostream&,
const DirectedEdge&);
239 #endif // GEOS_PLANARGRAPH_DIRECTEDEDGE_H