diff --git a/extern/polymesh b/extern/polymesh index 62677179123a61649755b05e86a8ed68adee81e9..13ccba8ea146d4520229785006d58ab1a4e24db1 160000 --- a/extern/polymesh +++ b/extern/polymesh @@ -1 +1 @@ -Subproject commit 62677179123a61649755b05e86a8ed68adee81e9 +Subproject commit 13ccba8ea146d4520229785006d58ab1a4e24db1 diff --git a/tests/algorithms/algorithms-test.cc b/tests/algorithms/algorithms-test.cc new file mode 100644 index 0000000000000000000000000000000000000000..0d07b2c12704b1905745ac450897c2b6ec9c4887 --- /dev/null +++ b/tests/algorithms/algorithms-test.cc @@ -0,0 +1,34 @@ +#include <doctest.hh> + +#include <polymesh/algorithms.hh> + +#include <typed-geometry/tg-std.hh> + +TEST_CASE("test that algorithms compile") +{ + pm::Mesh m; + auto pos = m.vertices().make_attribute<tg::pos3>(); + auto quadrics = m.vertices().make_attribute<tg::quadric3>(); + + return; // only compile test + + pm::decimate_down_to(m, pos, quadrics, 1000); + pm::triangulate_naive(m); + pm::deduplicate(m, pos); + pm::vertex_components(m); + pm::face_components(m); + pm::optimize_vertices_for_faces(m); + pm::make_delaunay(m, pos); + pm::normalize(pos); + pm::face_normals(pos); + + pm::split_edges_trimesh( + m, + [&](pm::edge_handle e) -> tg::optional<float> { + auto const l = pm::edge_length(e, pos); + if (l < 0.1f) + return {}; + return l; + }, + [&](pm::vertex_handle v, pm::halfedge_handle, pm::vertex_handle v_from, pm::vertex_handle v_to) { pos[v] = mix(pos[v_to], pos[v_from], 0.5f); }); +} diff --git a/tests/algorithms/delaunay-test.cc b/tests/algorithms/delaunay-test.cc index fc5543abd6fb1884363edb38d8c14afcd2c85ded..8a57f5a62bdb0fda2fd6b8b40bbe1b5ec3d80a52 100644 --- a/tests/algorithms/delaunay-test.cc +++ b/tests/algorithms/delaunay-test.cc @@ -1,8 +1,8 @@ #include <doctest.hh> #include <polymesh/Mesh.hh> -#include <polymesh/algorithms/remeshing/delaunay.hh> -#include <polymesh/algorithms/remeshing/triangulate.hh> +#include <polymesh/algorithms/delaunay.hh> +#include <polymesh/algorithms/triangulate.hh> #include <polymesh/formats.hh> #include <polymesh/objects/quad.hh> diff --git a/tests/viewer/viewer-test.cc b/tests/viewer/viewer-test.cc index 9a17ecb7e4dd337e357ec3feaaab37b657cafe24..19832d615118c9231b4c8f32a904887b92763750 100644 --- a/tests/viewer/viewer-test.cc +++ b/tests/viewer/viewer-test.cc @@ -7,6 +7,9 @@ TEST_CASE("glow::viewer test") { + // test should not actually show something + return; + pm::Mesh m; auto pos = pm::vertex_attribute<tg::pos3>(m);