CDT  1.3.0
C++ library for constrained Delaunay triangulation
CDT.h File Reference

Public API. More...

#include "CDTUtils.h"
#include "Triangulation.h"
#include "remove_at.hpp"
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iterator>
#include <memory>
#include <stack>
#include <vector>
#include "CDT.hpp"
Include dependency graph for CDT.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CDT::DuplicatesInfo
 Information about removed duplicated vertices. More...
 
struct  boost::hash< CDT::V2d< T > >
 

Namespaces

namespace  CDT
 Namespace containing triangulation functionality.
 

Typedefs

typedef unsigned short CDT::LayerDepth
 Type used for storing layer depths for triangles. More...
 
typedef LayerDepth CDT::BoundaryOverlapCount
 
typedef std::vector< TriIndVec > CDT::VerticesTriangles
 Triangles by vertex index. More...
 

Functions

CDT_EXPORT VerticesTriangles CDT::calculateTrianglesByVertex (const TriangleVec &triangles, VertInd verticesSize)
 Calculate triangles adjacent to vertices (triangles by vertex index) More...
 
template<typename T , typename TVertexIter , typename TGetVertexCoordX , typename TGetVertexCoordY >
DuplicatesInfo CDT::FindDuplicates (TVertexIter first, TVertexIter last, TGetVertexCoordX getX, TGetVertexCoordY getY)
 Find duplicates in given custom point-type range. More...
 
template<typename TVertex , typename TAllocator >
void CDT::RemoveDuplicates (std::vector< TVertex, TAllocator > &vertices, const std::vector< std::size_t > &duplicates)
 Remove duplicates in-place from vector of custom points. More...
 
template<typename T >
CDT_EXPORT DuplicatesInfo CDT::RemoveDuplicates (std::vector< V2d< T > > &vertices)
 Remove duplicated points in-place. More...
 
template<typename TEdgeIter , typename TGetEdgeVertexStart , typename TGetEdgeVertexEnd , typename TMakeEdgeFromStartAndEnd >
CDT_EXPORT void CDT::RemapEdges (TEdgeIter first, TEdgeIter last, const std::vector< std::size_t > &mapping, TGetEdgeVertexStart getStart, TGetEdgeVertexEnd getEnd, TMakeEdgeFromStartAndEnd makeEdge)
 Remap vertex indices in edges (in-place) using given vertex-index mapping. More...
 
CDT_EXPORT void CDT::RemapEdges (std::vector< Edge > &edges, const std::vector< std::size_t > &mapping)
 Remap vertex indices in edges (in-place) using given vertex-index mapping. More...
 
template<typename T , typename TVertex , typename TGetVertexCoordX , typename TGetVertexCoordY , typename TVertexAllocator , typename TEdgeIter , typename TGetEdgeVertexStart , typename TGetEdgeVertexEnd , typename TMakeEdgeFromStartAndEnd >
DuplicatesInfo CDT::RemoveDuplicatesAndRemapEdges (std::vector< TVertex, TVertexAllocator > &vertices, TGetVertexCoordX getX, TGetVertexCoordY getY, TEdgeIter edgesFirst, TEdgeIter edgesLast, TGetEdgeVertexStart getStart, TGetEdgeVertexEnd getEnd, TMakeEdgeFromStartAndEnd makeEdge)
 Find point duplicates, remove them from vector (in-place) and remap edges (in-place) More...
 
template<typename T >
CDT_EXPORT DuplicatesInfo CDT::RemoveDuplicatesAndRemapEdges (std::vector< V2d< T > > &vertices, std::vector< Edge > &edges)
 Same as a chained call of CDT::RemoveDuplicates + CDT::RemapEdges. More...
 
CDT_EXPORT EdgeUSet CDT::extractEdgesFromTriangles (const TriangleVec &triangles)
 Extract all edges of triangles. More...
 
CDT_EXPORT unordered_map< Edge, EdgeVec > CDT::EdgeToPiecesMapping (const unordered_map< Edge, EdgeVec > &pieceToOriginals)
 
template<typename T >
CDT_EXPORT unordered_map< Edge, std::vector< VertInd > > CDT::EdgeToSplitVertices (const unordered_map< Edge, EdgeVec > &edgeToPieces, const std::vector< V2d< T > > &vertices)
 
template<typename TEdgeIter , typename TGetEdgeVertexStart , typename TGetEdgeVertexEnd , typename TMakeEdgeFromStartAndEnd >
void CDT::RemapEdges (TEdgeIter first, const TEdgeIter last, const std::vector< std::size_t > &mapping, TGetEdgeVertexStart getStart, TGetEdgeVertexEnd getEnd, TMakeEdgeFromStartAndEnd makeEdge)
 Remap vertex indices in edges (in-place) using given vertex-index mapping. More...
 
template<typename T >
unordered_map< Edge, std::vector< VertInd > > CDT::EdgeToSplitVertices (const unordered_map< Edge, EdgeVec > &edgeToPieces, const std::vector< V2d< T > > &vertices)
 

Detailed Description

Public API.

Definition in file CDT.h.