CDT
1.4.1
C++ library for constrained Delaunay triangulation
|
Utilities and helpers. More...
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>
#include <vector>
#include <boost/array.hpp>
#include <boost/functional/hash.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/unordered_map.hpp>
#include <boost/unordered_set.hpp>
#include "CDTUtils.hpp"
Go to the source code of this file.
Classes | |
struct | CDT::V2d< T > |
2D vector More... | |
struct | CDT::Box2d< T > |
2D bounding box More... | |
struct | CDT::Edge |
Edge connecting two vertices: vertex with smaller index is always first. More... | |
struct | CDT::Triangle |
Triangulation triangle (counter-clockwise winding) More... | |
struct | CDT::PtTriLocation |
Location of point on a triangle. More... | |
struct | CDT::PtLineLocation |
Relative location of point to a line. More... | |
struct | boost::hash< CDT::Edge > |
Edge hasher. More... | |
Namespaces | |
namespace | CDT |
Namespace containing triangulation functionality. | |
Macros | |
#define | CDT_INLINE_IF_HEADER_ONLY inline |
Macro for inlining non-template functions when in header-only mode to avoid multiple declaration errors. | |
#define | CDT_EXPORT |
Export not needed in header-only mode. | |
Typedefs | |
typedef char | couldnt_parse_cxx_standard[-1] |
Error: couldn't parse standard. | |
typedef unsigned int | CDT::IndexSizeType |
typedef unsigned char | CDT::Index |
Index in triangle. | |
typedef IndexSizeType | CDT::VertInd |
Vertex index. | |
typedef IndexSizeType | CDT::TriInd |
Triangle index. | |
typedef std::vector< TriInd > | CDT::TriIndVec |
Vector of triangle indices. | |
typedef array< VertInd, 3 > | CDT::VerticesArr3 |
array of three vertex indices | |
typedef array< TriInd, 3 > | CDT::NeighborsArr3 |
array of three neighbors | |
typedef std::vector< Edge > | CDT::EdgeVec |
Vector of edges. | |
typedef unordered_set< Edge > | CDT::EdgeUSet |
Hash table of edges. | |
typedef unordered_set< TriInd > | CDT::TriIndUSet |
Hash table of triangles. | |
typedef unordered_map< TriInd, TriInd > | CDT::TriIndUMap |
Triangle hash map. | |
typedef std::vector< Triangle > | CDT::TriangleVec |
Vector of triangles. | |
Functions | |
template<typename T > | |
const T & | CDT::getX_V2d (const V2d< T > &v) |
X- coordinate getter for V2d. | |
template<typename T > | |
const T & | CDT::getY_V2d (const V2d< T > &v) |
Y-coordinate getter for V2d. | |
template<typename T > | |
bool | CDT::operator== (const CDT::V2d< T > &lhs, const CDT::V2d< T > &rhs) |
If two 2D vectors are exactly equal. | |
template<typename T , typename TVertexIter , typename TGetVertexCoordX , typename TGetVertexCoordY > | |
Box2d< T > | CDT::envelopBox (TVertexIter first, TVertexIter last, TGetVertexCoordX getX, TGetVertexCoordY getY) |
Bounding box of a collection of custom 2D points given coordinate getters. | |
template<typename T > | |
CDT_EXPORT Box2d< T > | CDT::envelopBox (const std::vector< V2d< T > > &vertices) |
Bounding box of a collection of 2D points. | |
VertInd | CDT::edge_get_v1 (const Edge &e) |
Get edge first vertex. | |
VertInd | CDT::edge_get_v2 (const Edge &e) |
Get edge second vertex. | |
Edge | CDT::edge_make (VertInd iV1, VertInd iV2) |
Get edge second vertex. | |
CDT_EXPORT Index | CDT::ccw (Index i) |
Advance vertex or neighbor index counter-clockwise. | |
CDT_EXPORT Index | CDT::cw (Index i) |
Advance vertex or neighbor index clockwise. | |
CDT_EXPORT bool | CDT::isOnEdge (PtTriLocation::Enum location) |
Check if location is classified as on any of three edges. | |
CDT_EXPORT Index | CDT::edgeNeighbor (PtTriLocation::Enum location) |
Neighbor index from a on-edge location. | |
template<typename T > | |
CDT_EXPORT T | CDT::orient2D (const V2d< T > &p, const V2d< T > &v1, const V2d< T > &v2) |
Orient p against line v1-v2 2D: robust geometric predicate. | |
template<typename T > | |
CDT_EXPORT PtLineLocation::Enum | CDT::locatePointLine (const V2d< T > &p, const V2d< T > &v1, const V2d< T > &v2, T orientationTolerance=T(0)) |
Check if point lies to the left of, to the right of, or on a line. | |
template<typename T > | |
CDT_EXPORT PtLineLocation::Enum | CDT::classifyOrientation (T orientation, T orientationTolerance=T(0)) |
Classify value of orient2d predicate. | |
template<typename T > | |
CDT_EXPORT PtTriLocation::Enum | CDT::locatePointTriangle (const V2d< T > &p, const V2d< T > &v1, const V2d< T > &v2, const V2d< T > &v3) |
Check if point a lies inside of, outside of, or on an edge of a triangle. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY Index | CDT::opoNbr (Index vertIndex) |
Opposed neighbor index from vertex index. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY Index | CDT::opoVrt (Index neighborIndex) |
Opposed vertex index from neighbor index. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY Index | CDT::opposedTriangleInd (const VerticesArr3 &vv, VertInd iVert) |
Index of triangle's neighbor opposed to a vertex. | |
CDT_INLINE_IF_HEADER_ONLY Index | CDT::edgeNeighborInd (const VerticesArr3 &vv, VertInd iVedge1, VertInd iVedge2) |
Index of triangle's neighbor opposed to an edge. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY Index | CDT::opposedVertexInd (const NeighborsArr3 &nn, TriInd iTopo) |
Index of triangle's vertex opposed to a triangle. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY Index | CDT::vertexInd (const VerticesArr3 &vv, VertInd iV) |
If triangle has a given vertex return vertex-index. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY TriInd | CDT::opposedTriangle (const Triangle &tri, VertInd iVert) |
Given triangle and a vertex find opposed triangle. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY TriInd | CDT::edgeNeighbor (const Triangle &tri, VertInd iVedge1, VertInd iVedge2) |
Given triangle and an edge find neighbor sharing the edge. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY VertInd | CDT::opposedVertex (const Triangle &tri, TriInd iTopo) |
Given two triangles, return vertex of first triangle opposed to the second. | |
template<typename T > | |
CDT_EXPORT bool | CDT::isInCircumcircle (const V2d< T > &p, const V2d< T > &v1, const V2d< T > &v2, const V2d< T > &v3) |
Test if point lies in a circumscribed circle of a triangle. | |
CDT_EXPORT CDT_INLINE_IF_HEADER_ONLY bool | CDT::verticesShareEdge (const TriIndVec &aTris, const TriIndVec &bTris) |
Test if two vertices share at least one common triangle. | |
template<typename T > | |
CDT_EXPORT T | CDT::distance (const V2d< T > &a, const V2d< T > &b) |
Distance between two 2D points. | |
template<typename T > | |
CDT_EXPORT T | CDT::distanceSquared (const V2d< T > &a, const V2d< T > &b) |
Squared distance between two 2D points. | |
CDT_INLINE_IF_HEADER_ONLY bool | CDT::touchesSuperTriangle (const Triangle &t) |
Check if any of triangle's vertices belongs to a super-triangle. | |
Utilities and helpers.
Definition in file CDTUtils.h.
#define CDT_EXPORT |
Export not needed in header-only mode.
Definition at line 40 of file CDTUtils.h.
#define CDT_INLINE_IF_HEADER_ONLY inline |
Macro for inlining non-template functions when in header-only mode to avoid multiple declaration errors.
Definition at line 38 of file CDTUtils.h.
typedef char couldnt_parse_cxx_standard[-1] |
Error: couldn't parse standard.
Definition at line 24 of file CDTUtils.h.