QuadEdgeQuartet.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2019 Daniel Baston
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/triangulate/quadedge/QuadEdge.h>
namespace geos {
namespace triangulate {
namespace quadedge {
class GEOS_DLL QuadEdgeQuartet {
public:
QuadEdgeQuartet() : e{{QuadEdge(0), QuadEdge(1), QuadEdge(2), QuadEdge(3)}} {
e[0].next = &(e[0]);
e[1].next = &(e[3]);
e[2].next = &(e[2]);
e[3].next = &(e[1]);
};
static QuadEdge& makeEdge(const Vertex& o, const Vertex & d, std::deque<QuadEdgeQuartet> & edges) {
edges.emplace_back();
auto& qe = edges.back();
qe.base().setOrig(o);
qe.base().setDest(d);
return qe.base();
}
QuadEdge& base() {
return e[0];
}
const QuadEdge& base() const {
return e[0];
}
void setVisited(bool status) {
for (auto& edge : e) {
edge.setVisited(status);
}
}
private:
std::array<QuadEdge, 4> e;
};
}
}
}
geos::triangulate::quadedge::QuadEdge
A class that represents the edge data structure which implements the quadedge algebra.
Definition QuadEdge.h:53
geos::triangulate::quadedge::QuadEdge::setOrig
void setOrig(const Vertex &o)
Sets the vertex for this edge's origin.
Definition QuadEdge.h:362
geos::triangulate::quadedge::Vertex
Models a site (node) in a QuadEdgeSubdivision.
Definition Vertex.h:60
geos::triangulate::quadedge
Classes to implement a topological subdivision of quadeges, to support creating triangulations and Vo...
Definition ConcaveHull.h:33
geos::triangulate
Classes to compute Delaunay triangulations.
Definition ConcaveHull.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38