24#include <geos/triangulate/quadedge/Vertex.h>
25#include <geos/geom/LineSegment.h>
32class GEOS_DLL QuadEdgeQuartet;
53class GEOS_DLL QuadEdge {
54 friend class QuadEdgeQuartet;
75 static QuadEdge*
connect(QuadEdge& a, QuadEdge& b, std::deque<QuadEdgeQuartet> & edges);
91 static void splice(QuadEdge& a, QuadEdge& b);
98 static void swap(QuadEdge& e);
114 explicit QuadEdge(int8_t _num) :
192 return (num < 3) ? *(
this + 1) : *(
this - 3);
198 return (num < 3) ? *(
this + 1) : *(this - 3);
209 return (num > 0) ? *(
this - 1) : *(
this + 3);
215 return (num > 0) ? *(
this - 1) : *(this + 3);
226 return (num < 2) ? *(
this + 2) : *(
this - 2);
232 return (num < 2) ? *(
this + 2) : *(this - 2);
260 return rot().oNext().rot();
277 return sym().oNext().sym();
288 return invRot().oNext().invRot();
305 return invRot().oNext().rot();
322 return oNext().sym();
328 return oNext().
sym();
339 return rot().oNext().invRot();
350 return sym().oNext();
408 return orig().getCoordinate().distance(
dest().getCoordinate());
438GEOS_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:53
A class that represents the edge data structure which implements the quadedge algebra.
Definition QuadEdge.h:53
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.
void setOrig(const Vertex &o)
Sets the vertex for this edge's origin.
Definition QuadEdge.h:362
bool equalsOriented(const QuadEdge &qe) const
Tests if this quadedge and another have the same line segment geometry with the same orientation.
static QuadEdge * makeEdge(const Vertex &o, const Vertex &d, std::deque< QuadEdgeQuartet > &edges)
Creates a new QuadEdge quartet from Vertex o to Vertex d.
void setDest(const Vertex &d)
Sets the vertex for this edge's destination.
Definition QuadEdge.h:373
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 & dNext() const
Gets the next CCW edge around (into) the destination of this edge.
Definition QuadEdge.h:275
static void swap(QuadEdge &e)
Turns an edge counterclockwise inside its enclosing quadrilateral.
const QuadEdge & dPrev() const
Gets the next CW edge around (into) the destination of this edge.
Definition QuadEdge.h:286
const QuadEdge & rot() const
Gets the dual of this edge, directed from its right to its left.
Definition QuadEdge.h:190
const QuadEdge & oPrev() const
Gets the next CW edge around (from) the origin of this edge.
Definition QuadEdge.h:258
const QuadEdge & rNext() const
Gets the edge around the right face ccw following this edge.
Definition QuadEdge.h:337
void remove()
Marks this quadedge as being deleted.
const QuadEdge & rPrev() const
Gets the edge around the right face ccw before this edge.
Definition QuadEdge.h:348
bool isLive() const
Tests whether this edge has been deleted.
Definition QuadEdge.h:152
const Vertex & orig() const
Gets the vertex for the edge's origin.
Definition QuadEdge.h:384
static void splice(QuadEdge &a, QuadEdge &b)
Splices two edges together or apart.
double getLength() const
Gets the length of the geometry of this quadedge.
Definition QuadEdge.h:406
const QuadEdge & sym() const
Gets the edge from the destination to the origin of this edge.
Definition QuadEdge.h:224
bool equalsNonOriented(const QuadEdge &qe) const
Tests if this quadedge and another have the same line segment geometry, regardless of orientation.
const Vertex & dest() const
Gets the vertex for the edge's destination.
Definition QuadEdge.h:395
const QuadEdge & lPrev() const
Gets the CCW edge around the left face before this edge.
Definition QuadEdge.h:320
const QuadEdge & lNext() const
Gets the CCW edge around the left face following this edge.
Definition QuadEdge.h:303
const QuadEdge & oNext() const
Gets the next CCW edge around the origin of this edge.
Definition QuadEdge.h:241
void setNext(QuadEdge *p_next)
Sets the connected edge.
Definition QuadEdge.h:174
const QuadEdge & invRot() const
Gets the dual of this edge, directed from its left to its right.
Definition QuadEdge.h:207
Models a site (node) in a QuadEdgeSubdivision.
Definition Vertex.h:60
Classes to implement a topological subdivision of quadeges, to support creating triangulations and Vo...
Definition ConcaveHull.h:33
Classes to compute Delaunay triangulations.
Definition ConcaveHull.h:32
Basic namespace for all GEOS functionalities.
Definition geos.h:39