diff --git a/cmake/recipes/predicates.cmake b/cmake/recipes/predicates.cmake index 83735b084e..145c94e531 100644 --- a/cmake/recipes/predicates.cmake +++ b/cmake/recipes/predicates.cmake @@ -8,10 +8,10 @@ include(CPM) CPMAddPackage( NAME predicates GITHUB_REPOSITORY wildmeshing/libigl-predicates - GIT_TAG f1fcce5d20d5a8e887cb694dc6aeaafab9ca1e29 + GIT_TAG 83b924928a12d9b578968508b303f90c738d6deb ) FetchContent_MakeAvailable(predicates) add_library(predicates::predicates ALIAS predicates) -set_target_properties(predicates PROPERTIES FOLDER third_party) \ No newline at end of file +set_target_properties(predicates PROPERTIES FOLDER third_party) diff --git a/src/wmtk/io/MshReader.cpp b/src/wmtk/io/MshReader.cpp index a71fb62b95..86f1125933 100644 --- a/src/wmtk/io/MshReader.cpp +++ b/src/wmtk/io/MshReader.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -13,7 +14,6 @@ #include #include "mshio/MshSpec.h" -#include "predicates.h" namespace wmtk::io { MshReader::MshReader() = default; @@ -372,7 +372,7 @@ template <> void MshReader::validate<3>() { assert(V.cols() == 3); - exactinit(); + igl_predicates::exactinit(); { // check inversion @@ -423,4 +423,4 @@ void MshReader::validate<3>() } } } -} // namespace wmtk::io \ No newline at end of file +} // namespace wmtk::io diff --git a/src/wmtk/utils/orient.cpp b/src/wmtk/utils/orient.cpp index e31f58c77f..64e6eadafe 100644 --- a/src/wmtk/utils/orient.cpp +++ b/src/wmtk/utils/orient.cpp @@ -38,7 +38,7 @@ void exactinit() } private: - MySingleton() { ::exactinit(); } + MySingleton() { igl_predicates::exactinit(); } }; MySingleton::instance(); } @@ -164,7 +164,7 @@ int wmtk_orient3d( Eigen::Vector3d p3nc = p3; exactinit(); - const auto res = orient3d(p0nc.data(), p1nc.data(), p2nc.data(), p3nc.data()); + const auto res = igl_predicates::orient3d(p0nc.data(), p1nc.data(), p2nc.data(), p3nc.data()); if (res > 0) return 1; @@ -181,7 +181,7 @@ int wmtk_orient2d(double p0x, double p0y, double p1x, double p1y, double p2x, do double p0[2]{p0x, p0y}; double p1[2]{p1x, p1y}; double p2[2]{p2x, p2y}; - const auto res = orient2d(p0, p1, p2); + const auto res = igl_predicates::orient2d(p0, p1, p2); if (res > 0) return 1; @@ -254,7 +254,7 @@ int wmtk_orient2d( Eigen::Vector2d p2nc = p2; exactinit(); - const auto res = orient2d(p0nc.data(), p1nc.data(), p2nc.data()); + const auto res = igl_predicates::orient2d(p0nc.data(), p1nc.data(), p2nc.data()); if (res > 0) return 1; diff --git a/tests/test_3d_invariants.cpp b/tests/test_3d_invariants.cpp index 8f8286ba58..e0499253d6 100644 --- a/tests/test_3d_invariants.cpp +++ b/tests/test_3d_invariants.cpp @@ -16,7 +16,7 @@ using namespace wmtk::invariants; TEST_CASE("tet_inversion_invariant", "[invariants][3D]") { - exactinit(); + igl_predicates::exactinit(); DEBUG_TetMesh m = single_tet(); auto position_handle = m.register_attribute("vertices", PrimitiveType::Vertex, 3); auto position_accessor = m.create_accessor(position_handle); @@ -47,8 +47,8 @@ TEST_CASE("tet_inversion_invariant", "[invariants][3D]") Tuple t = v0; - std::cout << orient3d(p0.data(), p1.data(), p2.data(), p3.data()) << std::endl; - CHECK(orient3d(p0.data(), p1.data(), p2.data(), p3.data()) > 0); + std::cout << igl_predicates::orient3d(p0.data(), p1.data(), p2.data(), p3.data()) << std::endl; + CHECK(igl_predicates::orient3d(p0.data(), p1.data(), p2.data(), p3.data()) > 0); CHECK(wmtk::utils::wmtk_orient3d(p0, p1, p2, p3) > 0); for (const auto& t : m.get_all(PrimitiveType::Triangle)) { @@ -80,7 +80,7 @@ TEST_CASE("tet_inversion_invariant", "[invariants][3D]") TEST_CASE("tet_rational_inversion_invariant", "[invariants][3D]") { - exactinit(); + igl_predicates::exactinit(); DEBUG_TetMesh m = single_tet(); auto position_handle = m.register_attribute("vertices", PrimitiveType::Vertex, 3); auto position_accessor = m.create_accessor(position_handle); @@ -143,4 +143,4 @@ TEST_CASE("orient3d", "[invariants][3D]") REQUIRE(utils::wmtk_orient3d(v0, v1, v2, v3) == utils::wmtk_orient3d(v0d, v1d, v2d, v3d)); REQUIRE(utils::wmtk_orient3d(v0, v2, v1, v3) == utils::wmtk_orient3d(v0d, v2d, v1d, v3d)); -} \ No newline at end of file +}