Skip to content

Commit

Permalink
Migrate to CGAL 6
Browse files Browse the repository at this point in the history
  • Loading branch information
unageek committed Nov 19, 2024
1 parent 7415650 commit 6fbe5bf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions benches/libigl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ set_target_properties(${TARGET} PROPERTIES
)

if(UNIX)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Werror)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
elseif(MSVC)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd4702)
target_compile_options(${TARGET} PRIVATE /W4 /wd4702)
endif()

target_link_libraries(${TARGET} PRIVATE
Expand Down
5 changes: 3 additions & 2 deletions include/kigumi/Side_of_triangle_soup.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <algorithm>
#include <iterator>
#include <stdexcept>
#include <variant>
#include <vector>

namespace kigumi {
Expand Down Expand Up @@ -53,13 +54,13 @@ class Side_of_triangle_soup {
continue;
}

if (const auto* point = boost::get<Point>(&*result)) {
if (const auto* point = std::get<Point>(&*result)) {
if (*point == p) {
return CGAL::ON_ORIENTED_BOUNDARY;
}
auto d = CGAL::squared_distance(p, *point);
intersections_.emplace_back(std::move(d), fi);
} else if (const auto* segment = boost::get<Segment>(&*result)) {
} else if (const auto* segment = std::get<Segment>(&*result)) {
if (segment->source() == p || segment->target() == p) {
return CGAL::ON_ORIENTED_BOUNDARY;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/face_face_intersection_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <algorithm>
#include <array>
#include <boost/variant/get.hpp>
#include <variant>
#include <vector>

using K = CGAL::Exact_predicates_exact_constructions_kernel;
Expand Down Expand Up @@ -53,16 +53,16 @@ bool test(Point_list& points, std::array<std::size_t, 3> abc, std::array<std::si

auto inter = CGAL::intersection(Triangle{pa, pb, pc}, Triangle{pp, pq, pr});
if (inter) {
if (const auto* p = boost::get<Point>(&*inter)) {
if (const auto* p = std::get<Point>(&*inter)) {
expected.push_back(*p);
} else if (const auto* s = boost::get<Segment>(&*inter)) {
} else if (const auto* s = std::get<Segment>(&*inter)) {
expected.push_back(s->source());
expected.push_back(s->target());
} else if (const auto* t = boost::get<Triangle>(&*inter)) {
} else if (const auto* t = std::get<Triangle>(&*inter)) {
expected.push_back(t->vertex(0));
expected.push_back(t->vertex(1));
expected.push_back(t->vertex(2));
} else if (const auto* ps = boost::get<std::vector<Point>>(&*inter)) {
} else if (const auto* ps = std::get<std::vector<Point>>(&*inter)) {
expected = *ps;
}
}
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 3523 files

0 comments on commit 6fbe5bf

Please sign in to comment.