|
CDT_EXPORT VerticesTriangles | CDT::calculateTrianglesByVertex (const TriangleVec &triangles, VertInd verticesSize) |
| Calculate triangles adjacent to vertices (triangles by vertex index)
|
|
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.
|
|
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.
|
|
template<typename T > |
CDT_EXPORT DuplicatesInfo | CDT::RemoveDuplicates (std::vector< V2d< T > > &vertices) |
| Remove duplicated points in-place.
|
|
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.
|
|
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.
|
|
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)
|
|
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.
|
|
CDT_EXPORT EdgeUSet | CDT::extractEdgesFromTriangles (const TriangleVec &triangles) |
| Extract all edges of triangles.
|
|
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 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.
- Note
- duplicates are points with exactly same X and Y coordinates
- Template Parameters
-
TVertexIter | iterator that dereferences to custom point type |
TGetVertexCoordX | function object getting x coordinate from vertex. Getter signature: const TVertexIter::value_type& -> T |
TGetVertexCoordY | function object getting y coordinate from vertex. Getter signature: const TVertexIter::value_type& -> T |
- Parameters
-
first | beginning of the range of vertices |
last | end of the range of vertices |
getX | getter of X-coordinate |
getY | getter of Y-coordinate |
- Returns
- information about vertex duplicates
Definition at line 293 of file CDT.h.
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.
- Template Parameters
-
TEdgeIter | iterator that dereferences to custom edge type |
TGetEdgeVertexStart | function object getting start vertex index from an edge. Getter signature: const TEdgeIter::value_type& -> CDT::VertInd |
TGetEdgeVertexEnd | function object getting end vertex index from an edge. Getter signature: const TEdgeIter::value_type& -> CDT::VertInd |
TMakeEdgeFromStartAndEnd | function object that makes new edge from start and end vertices |
- Parameters
-
first | beginning of the range of edges |
last | end of the range of edges |
mapping | vertex-index mapping |
getStart | getter of edge start vertex index |
getEnd | getter of edge end vertex index |
makeEdge | factory for making edge from vetices |
Definition at line 340 of file CDT.h.
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)
- Note
- Same as a chained call of CDT::FindDuplicates, CDT::RemoveDuplicates, and CDT::RemapEdges
- Template Parameters
-
T | type of vertex coordinates (e.g., float, double) |
TVertex | type of vertex |
TGetVertexCoordX | function object getting x coordinate from vertex. Getter signature: const TVertexIter::value_type& -> T |
TGetVertexCoordY | function object getting y coordinate from vertex. Getter signature: const TVertexIter::value_type& -> T |
TEdgeIter | iterator that dereferences to custom edge type |
TGetEdgeVertexStart | function object getting start vertex index from an edge. Getter signature: const TEdgeIter::value_type& -> CDT::VertInd |
TGetEdgeVertexEnd | function object getting end vertex index from an edge. Getter signature: const TEdgeIter::value_type& -> CDT::VertInd |
TMakeEdgeFromStartAndEnd | function object that makes new edge from start and end vertices |
- Parameters
-
[in,out] | vertices | vertices to remove duplicates from |
[in,out] | edges | collection of edges connecting vertices |
| getX | getter of X-coordinate |
| getY | getter of Y-coordinate |
| edgesFirst | beginning of the range of edges |
| edgesLast | end of the range of edges |
| getStart | getter of edge start vertex index |
| getEnd | getter of edge end vertex index |
| makeEdge | factory for making edge from vetices |
- Returns
- information about vertex duplicates
Definition at line 366 of file CDT.h.