CDT  1.4.1
C++ library for constrained Delaunay triangulation
Loading...
Searching...
No Matches
CDT.cpp
Go to the documentation of this file.
1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
14#ifdef CDT_USE_AS_COMPILED_LIBRARY
15
16#include "CDT.hpp"
17#include "CDTUtils.hpp"
18#include "InitializeWithGrid.h"
19#include "Triangulation.hpp"
20#include "VerifyTopology.h"
21
22namespace CDT
23{
24
25template struct CDT_EXPORT V2d<float>;
26template struct CDT_EXPORT V2d<double>;
27
28template struct CDT_EXPORT Box2d<float>;
29template struct CDT_EXPORT Box2d<double>;
30
31template class CDT_EXPORT Triangulation<float>;
32template class CDT_EXPORT Triangulation<double>;
33
34template CDT_EXPORT Box2d<float>
35envelopBox<float>(const std::vector<V2d<float> >&);
36template CDT_EXPORT Box2d<double>
37envelopBox<double>(const std::vector<V2d<double> >&);
38
39template CDT_EXPORT DuplicatesInfo
40RemoveDuplicates<float>(std::vector<V2d<float> >&);
41template CDT_EXPORT DuplicatesInfo
42RemoveDuplicates<double>(std::vector<V2d<double> >&);
43
45 std::vector<V2d<float> >&,
46 std::vector<Edge>&);
48 std::vector<V2d<double> >&,
49 std::vector<Edge>&);
50
51template CDT_EXPORT bool
53template CDT_EXPORT bool
55
57 float,
58 float,
59 float,
60 float,
61 std::size_t,
62 std::size_t,
63 Triangulation<float>&);
65 double,
66 double,
67 double,
68 double,
69 std::size_t,
70 std::size_t,
71 Triangulation<double>&);
72
73} // namespace CDT
74
75#endif
#define CDT_EXPORT
Export not needed in header-only mode.
Definition CDTUtils.h:40
Utilities and helpers - implementation.
Public API - implementation.
Helper function to initialize triangulation with regular grid instead of super-triangle.
Triangulation class - implementation.
Helper function to verify if triangulation has no inconsistencies.
Data structure representing a 2D constrained Delaunay triangulation.
void RemoveDuplicates(std::vector< TVertex, TAllocator > &vertices, const std::vector< std::size_t > &duplicates)
Remove duplicates in-place from vector of custom points.
Definition CDT.h:322
DuplicatesInfo 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)
Definition CDT.h:366
Namespace containing triangulation functionality.
bool verifyTopology(const CDT::Triangulation< T, TNearPointLocator > &cdt)
Verify that triangulation topology is consistent.
Box2d< T > envelopBox(TVertexIter first, TVertexIter last, TGetVertexCoordX getX, TGetVertexCoordY getY)
Bounding box of a collection of custom 2D points given coordinate getters.
Definition CDTUtils.h:187
void initializeWithRegularGrid(const T xmin, const T xmax, const T ymin, const T ymax, const std::size_t xres, const std::size_t yres, Triangulation< T, TNearPointLocator > &out)
Make a triangulation that uses regular grid triangles instead of super-triangle.