Skip to content
Snippets Groups Projects
Commit 9674de5c authored by Philip Trettner's avatar Philip Trettner
Browse files

updated subs, algorithm compile test

parent 93253cd2
No related branches found
No related tags found
No related merge requests found
Pipeline #12494 passed
polymesh @ 13ccba8e
Subproject commit 62677179123a61649755b05e86a8ed68adee81e9 Subproject commit 13ccba8ea146d4520229785006d58ab1a4e24db1
#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); });
}
#include <doctest.hh> #include <doctest.hh>
#include <polymesh/Mesh.hh> #include <polymesh/Mesh.hh>
#include <polymesh/algorithms/remeshing/delaunay.hh> #include <polymesh/algorithms/delaunay.hh>
#include <polymesh/algorithms/remeshing/triangulate.hh> #include <polymesh/algorithms/triangulate.hh>
#include <polymesh/formats.hh> #include <polymesh/formats.hh>
#include <polymesh/objects/quad.hh> #include <polymesh/objects/quad.hh>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
TEST_CASE("glow::viewer test") TEST_CASE("glow::viewer test")
{ {
// test should not actually show something
return;
pm::Mesh m; pm::Mesh m;
auto pos = pm::vertex_attribute<tg::pos3>(m); auto pos = pm::vertex_attribute<tg::pos3>(m);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment