Commit 93253cd2 authored by Philip Trettner's avatar Philip Trettner

updated subs, added simple viewer test

parent 2435630b
Pipeline #12493 failed with stage
in 60 minutes and 1 second
Subproject commit f1f7299ba8453e5fbc2dc7229811eba3071aa31e
Subproject commit 79f278f3a41b551daa20fe45a8a9cb5b5926ff0d
Subproject commit 4179b2dde20c10b6bfd3ede55b44dd33a351afe8
Subproject commit b2b528eb65352c877ef76665d67ce5d045e40a7d
Subproject commit a50e12bfb73f7cf764d954200cc770261e52fb70
Subproject commit 62677179123a61649755b05e86a8ed68adee81e9
Subproject commit f2737400016d652e77048e54885e466ce769cb6c
Subproject commit 095a07720aca3cc96862027840b83134979d6510
#include <doctest.hh>
#include <glow-extras/glfw/GlfwContext.hh>
int main(int argc, char **argv)
glow::glfw::GlfwContext ctx;
doctest::Context context;
context.applyCommandLine(argc, argv);
......@@ -40,8 +40,8 @@ void test_cube(pm::Mesh const& m, pm::vertex_attribute<Pos3> const& pos)
CHECK(f_comps == 1);
// attributes
auto vnormals = vertex_normals_by_area(m, pos);
auto fnormals = face_normals(m, pos);
auto vnormals = vertex_normals_by_area(pos);
auto fnormals = face_normals(pos);
auto fareas = m.faces().map([&](auto f) { return face_area(f, pos); });
auto edge_lengths = m.edges().make_attribute<float>();
#include <doctest.hh>
#include <imgui/imgui.h>
#include <glow-extras/viewer/view.hh>
#include <polymesh/pm.hh>
TEST_CASE("glow::viewer test")
pm::Mesh m;
auto pos = pm::vertex_attribute<tg::pos3>(m);
pm::objects::add_quad(m, [&](auto v, float x, float y) { pos[v] = {x, 0, y}; }, 32, 32);
float noise = 0.01f;
glow::viewer::interactive([&](auto) {
auto changed = ImGui::SliderFloat("noise", &noise, 0.0f, 0.1f);
tg::rng rng;
for (auto& p : pos)
p.y = gaussian(rng, 0.f, noise);
auto v = view(pos, gv::clear_accumulation(changed));
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment