20 #ifndef GEOS_TRIANGULATE_QUADEDGE_QUADEDGE_H
21 #define GEOS_TRIANGULATE_QUADEDGE_QUADEDGE_H
25 #include <geos/triangulate/quadedge/Vertex.h>
26 #include <geos/geom/LineSegment.h>
29 namespace triangulate {
33 class GEOS_DLL QuadEdgeQuartet;
55 friend class QuadEdgeQuartet;
193 return (num < 3) ? *(
this + 1) : *(
this - 3);
199 return (num < 3) ? *(
this + 1) : *(
this - 3);
207 inline const QuadEdge&
210 return (num > 0) ? *(
this - 1) : *(
this + 3);
216 return (num > 0) ? *(
this - 1) : *(
this + 3);
224 inline const QuadEdge&
227 return (num < 2) ? *(
this + 2) : *(
this - 2);
233 return (num < 2) ? *(
this + 2) : *(
this - 2);
241 inline const QuadEdge&
258 inline const QuadEdge&
275 inline const QuadEdge&
303 inline const QuadEdge&
320 inline const QuadEdge&
323 return oNext().
sym();
329 return oNext().
sym();
337 inline const QuadEdge&
351 return sym().
oNext();
409 return orig().getCoordinate().distance(dest().getCoordinate());
439 GEOS_DLL std::ostream& operator<< (std::ostream& os,
const QuadEdge* e);
A class that represents the edge data structure which implements the quadedge algebra.
Definition: QuadEdge.h:54
const QuadEdge & invRot() const
Gets the dual of this edge, directed from its left to its right.
Definition: QuadEdge.h:208
const QuadEdge & lPrev() const
Gets the CCW edge around the left face before this edge.
Definition: QuadEdge.h:321
void setOrig(const Vertex &o)
Sets the vertex for this edge's origin.
Definition: QuadEdge.h:363
const QuadEdge & dPrev() const
Gets the next CW edge around (into) the destination of this edge.
Definition: QuadEdge.h:287
const QuadEdge & oNext() const
Gets the next CCW edge around the origin of this edge.
Definition: QuadEdge.h:242
bool equalsOriented(const QuadEdge &qe) const
Tests if this quadedge and another have the same line segment geometry with the same orientation.
void setDest(const Vertex &d)
Sets the vertex for this edge's destination.
Definition: QuadEdge.h:374
const QuadEdge & rot() const
Gets the dual of this edge, directed from its right to its left.
Definition: QuadEdge.h:191
static QuadEdge * makeEdge(const Vertex &o, const Vertex &d, std::deque< QuadEdgeQuartet > &edges)
Creates a new QuadEdge quartet from Vertex o to Vertex d.
static void swap(QuadEdge &e)
Turns an edge counterclockwise inside its enclosing quadrilateral.
const QuadEdge & getPrimary()
Gets the primary edge of this quadedge and its sym.
std::unique_ptr< geom::LineSegment > toLineSegment() const
Creates a geom::LineSegment representing the geometry of this edge.
const QuadEdge & rPrev() const
Gets the edge around the right face ccw before this edge.
Definition: QuadEdge.h:349
const Vertex & dest() const
Gets the vertex for the edge's destination.
Definition: QuadEdge.h:396
const QuadEdge & rNext() const
Gets the edge around the right face ccw following this edge.
Definition: QuadEdge.h:338
void remove()
Marks this quadedge as being deleted.
const QuadEdge & sym() const
Gets the edge from the destination to the origin of this edge.
Definition: QuadEdge.h:225
const QuadEdge & oPrev() const
Gets the next CW edge around (from) the origin of this edge.
Definition: QuadEdge.h:259
bool isLive() const
Tests whether this edge has been deleted.
Definition: QuadEdge.h:153
static void splice(QuadEdge &a, QuadEdge &b)
Splices two edges together or apart.
static QuadEdge * connect(QuadEdge &a, QuadEdge &b, std::deque< QuadEdgeQuartet > &edges)
Creates a new QuadEdge connecting the destination of a to the origin of b, in such a way that all thr...
const QuadEdge & lNext() const
Gets the CCW edge around the left face following this edge.
Definition: QuadEdge.h:304
double getLength() const
Gets the length of the geometry of this quadedge.
Definition: QuadEdge.h:407
const QuadEdge & dNext() const
Gets the next CCW edge around (into) the destination of this edge.
Definition: QuadEdge.h:276
const Vertex & orig() const
Gets the vertex for the edge's origin.
Definition: QuadEdge.h:385
bool equalsNonOriented(const QuadEdge &qe) const
Tests if this quadedge and another have the same line segment geometry, regardless of orientation.
void setNext(QuadEdge *p_next)
Sets the connected edge.
Definition: QuadEdge.h:175
Models a site (node) in a QuadEdgeSubdivision.
Definition: Vertex.h:60
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26