#include <QuadEdge.h>
Public Member Functions | |
virtual void | free () |
const QuadEdge & | getPrimary () const |
virtual void | setData (void *data) |
virtual void * | getData () |
void | remove () |
bool | isLive () |
void | setNext (QuadEdge *next) |
QuadEdge & | rot () const |
QuadEdge & | invRot () const |
QuadEdge & | sym () const |
QuadEdge & | oNext () const |
QuadEdge & | oPrev () const |
QuadEdge & | dNext () const |
QuadEdge & | dPrev () const |
QuadEdge & | lNext () const |
QuadEdge & | lPrev () const |
QuadEdge & | rNext () |
QuadEdge & | rPrev () |
void | setOrig (const Vertex &o) |
void | setDest (const Vertex &d) |
const Vertex & | orig () const |
const Vertex & | dest () const |
double | getLength () const |
bool | equalsNonOriented (const QuadEdge &qe) const |
bool | equalsOriented (const QuadEdge &qe) const |
std::auto_ptr< geom::LineSegment > | toLineSegment () const |
Static Public Member Functions | |
static std::auto_ptr< QuadEdge > | makeEdge (const Vertex &o, const Vertex &d) |
static std::auto_ptr< QuadEdge > | connect (QuadEdge &a, QuadEdge &b) |
static void | splice (QuadEdge &a, QuadEdge &b) |
static void | swap (QuadEdge &e) |
Each edge object is part of a quartet of 4 edges, linked via their _rot
references. Any edge in the group may be accessed using a series of rot() operations. Quadedges in a subdivision are linked together via their next
references. The linkage between the quadedge quartets determines the topology of the subdivision.
The edge class does not contain separate information for vertice or faces; a vertex is implicitly defined as a ring of edges (created using the next
field).
JTS: Martin Davis
Benjamin Campbell
static std::auto_ptr<QuadEdge> geos::triangulate::quadedge::QuadEdge::connect | ( | QuadEdge & | a, | |
QuadEdge & | b | |||
) | [static] |
Creates a new QuadEdge connecting the destination of a to the origin of b, in such a way that all three have the same left face after the connection is complete. Additionally, the data pointers of the new edge are set.
const Vertex& geos::triangulate::quadedge::QuadEdge::dest | ( | ) | const [inline] |
Gets the vertex for the edge's destination
QuadEdge& geos::triangulate::quadedge::QuadEdge::dNext | ( | ) | const [inline] |
Gets the next CCW edge around (into) the destination of this edge.
QuadEdge& geos::triangulate::quadedge::QuadEdge::dPrev | ( | ) | const [inline] |
Gets the next CW edge around (into) the destination of this edge.
bool geos::triangulate::quadedge::QuadEdge::equalsNonOriented | ( | const QuadEdge & | qe | ) | const |
Tests if this quadedge and another have the same line segment geometry, regardless of orientation.
qe | a quadege |
bool geos::triangulate::quadedge::QuadEdge::equalsOriented | ( | const QuadEdge & | qe | ) | const |
Tests if this quadedge and another have the same line segment geometry with the same orientation.
qe | a quadege |
virtual void geos::triangulate::quadedge::QuadEdge::free | ( | ) | [virtual] |
Free the QuadEdge quartet associated with this QuadEdge by a connect() or makeEdge() call. DO NOT call this function on a QuadEdge that was not returned by connect() or makeEdge().
virtual void* geos::triangulate::quadedge::QuadEdge::getData | ( | ) | [virtual] |
Gets the external data value for this edge.
double geos::triangulate::quadedge::QuadEdge::getLength | ( | ) | const [inline] |
Gets the length of the geometry of this quadedge.
const QuadEdge& geos::triangulate::quadedge::QuadEdge::getPrimary | ( | ) | const |
Gets the primary edge of this quadedge and its sym
. The primary edge is the one for which the origin and destination coordinates are ordered according to the standard Coordinate ordering
QuadEdge& geos::triangulate::quadedge::QuadEdge::invRot | ( | ) | const [inline] |
Gets the dual of this edge, directed from its left to its right.
bool geos::triangulate::quadedge::QuadEdge::isLive | ( | ) | [inline] |
Tests whether this edge has been deleted.
QuadEdge& geos::triangulate::quadedge::QuadEdge::lNext | ( | ) | const [inline] |
Gets the CCW edge around the left face following this edge.
QuadEdge& geos::triangulate::quadedge::QuadEdge::lPrev | ( | ) | const [inline] |
Gets the CCW edge around the left face before this edge.
QuadEdge& geos::triangulate::quadedge::QuadEdge::oNext | ( | ) | const [inline] |
Gets the next CCW edge around the origin of this edge.
QuadEdge& geos::triangulate::quadedge::QuadEdge::oPrev | ( | ) | const [inline] |
Gets the next CW edge around (from) the origin of this edge.
const Vertex& geos::triangulate::quadedge::QuadEdge::orig | ( | ) | const [inline] |
Gets the vertex for the edge's origin
void geos::triangulate::quadedge::QuadEdge::remove | ( | ) |
Marks this quadedge as being deleted. This does not free the memory used by this quadedge quartet, but indicates that this quadedge quartet no longer participates in a subdivision.
NOTE: called "delete" in JTS
QuadEdge& geos::triangulate::quadedge::QuadEdge::rNext | ( | ) | [inline] |
Gets the edge around the right face ccw following this edge.
QuadEdge& geos::triangulate::quadedge::QuadEdge::rot | ( | ) | const [inline] |
Gets the dual of this edge, directed from its right to its left.
QuadEdge& geos::triangulate::quadedge::QuadEdge::rPrev | ( | ) | [inline] |
Gets the edge around the right face ccw before this edge.
virtual void geos::triangulate::quadedge::QuadEdge::setData | ( | void * | data | ) | [virtual] |
Sets the external data value for this edge.
data | an object containing external data |
void geos::triangulate::quadedge::QuadEdge::setDest | ( | const Vertex & | d | ) | [inline] |
Sets the vertex for this edge's destination
d | the destination vertex |
void geos::triangulate::quadedge::QuadEdge::setNext | ( | QuadEdge * | next | ) | [inline] |
Sets the connected edge
nextEdge | edge |
void geos::triangulate::quadedge::QuadEdge::setOrig | ( | const Vertex & | o | ) | [inline] |
Sets the vertex for this edge's origin
o | the origin vertex |
Splices two edges together or apart. Splice affects the two edge rings around the origins of a and b, and, independently, the two edge rings around the left faces of a
and b
. In each case, (i) if the two rings are distinct, Splice will combine them into one, or (ii) if the two are the same ring, Splice will break it into two separate pieces. Thus, Splice can be used both to attach the two edges together, and to break them apart.
a | an edge to splice | |
b | an edge to splice |
static void geos::triangulate::quadedge::QuadEdge::swap | ( | QuadEdge & | e | ) | [static] |
Turns an edge counterclockwise inside its enclosing quadrilateral.
e | the quadedge to turn |
QuadEdge& geos::triangulate::quadedge::QuadEdge::sym | ( | ) | const [inline] |
Gets the edge from the destination to the origin of this edge.
std::auto_ptr<geom::LineSegment> geos::triangulate::quadedge::QuadEdge::toLineSegment | ( | ) | const |