Reworked constrained Delanay triangulation of polygons / expolygons
using CGAL CDT implementation: Removed all the sets / maps, replaced with vectors and CDT vertex intrusive indices. Reworked the outside / inside classification using just the CDT "constrained edge" attributes and a single queue. Cherry pick commit 1648ae853d6c69a1118efbc694dadeb9965154ee
This commit is contained in:
parent
c11948a084
commit
59e14cb752
3 changed files with 87 additions and 148 deletions
|
@ -46,7 +46,7 @@ TEST_CASE("Triangulate rectangle with restriction on edge", "[Triangulation]")
|
|||
// 0 1 2 3
|
||||
Points points = {Point(1, 1), Point(2, 1), Point(2, 2), Point(1, 2)};
|
||||
Triangulation::HalfEdges edges1 = {{1, 3}};
|
||||
std::vector<Vec3i> indices1 = Triangulation::triangulate(points, edges1, true);
|
||||
std::vector<Vec3i> indices1 = Triangulation::triangulate(points, edges1);
|
||||
|
||||
auto check = [](int i1, int i2, Vec3i t) -> bool {
|
||||
return true;
|
||||
|
@ -59,7 +59,7 @@ TEST_CASE("Triangulate rectangle with restriction on edge", "[Triangulation]")
|
|||
CHECK(check(i1, i2, indices1[1]));
|
||||
|
||||
Triangulation::HalfEdges edges2 = {{0, 2}};
|
||||
std::vector<Vec3i> indices2 = Triangulation::triangulate(points, edges2, true);
|
||||
std::vector<Vec3i> indices2 = Triangulation::triangulate(points, edges2);
|
||||
REQUIRE(indices2.size() == 2);
|
||||
i1 = edges2.begin()->first;
|
||||
i2 = edges2.begin()->second;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue