From 032904694b2a0a7b4c6d5f93cf6919edb9ebced2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gro=C3=9F?= Date: Tue, 28 Jan 2025 09:23:13 +0100 Subject: [PATCH] Fix typo in rigid body example --- plugins/examples/rigid_body.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/examples/rigid_body.cxx b/plugins/examples/rigid_body.cxx index 1d3cd1113..95501c1b0 100644 --- a/plugins/examples/rigid_body.cxx +++ b/plugins/examples/rigid_body.cxx @@ -113,7 +113,7 @@ class rigid_body_test : bool do_normalize = true; bool integrate_omega = false; double time_scale = 1.0f; - bool use_food_points = true; + bool use_foot_points = true; std::vector> B; std::vector> dB; std::vector foot_points; @@ -167,14 +167,14 @@ class rigid_body_test : void integrate(double dt) { std::vector foot_points_word; - if (use_food_points) + if (use_foot_points) compute_foot_points_world(foot_points_word); size_t i = 0; if (use_double) { for (auto& b : dB) { cgv::dvec3 G(0.0, apply_gravity ? double(-gravity / b.iM) : 0.0, 0.0); cgv::dvec3 T(0.0); - if (use_food_points) { + if (use_foot_points) { if (foot_points_word[i][1] < -9.99999) { b.X[1] -= foot_points_word[i][1] + 9.999995; cgv::dvec3 r = foot_points_word[i] - b.X; @@ -191,7 +191,7 @@ class rigid_body_test : for (auto& b : B) { cgv::vec3 G(0.0f, apply_gravity ? (-gravity / b.iM) : 0.0f, 0.0f); cgv::vec3 T(0.0f); - if (use_food_points) { + if (use_foot_points) { if (foot_points_word[i][1] < -9.99999f) { b.X[1] -= foot_points_word[i][1] + 9.999995f; cgv::vec3 r = foot_points_word[i] - b.X; @@ -396,7 +396,7 @@ class rigid_body_test : r.set_radius(ctx, 0.2f); r.render(ctx, 0, B.size()); } - if (use_food_points) { + if (use_foot_points) { std::vector P; compute_foot_points_world(P); auto& r = cgv::render::ref_sphere_renderer(ctx); @@ -440,7 +440,7 @@ class rigid_body_test : add_member_control(this, "Time Scale", time_scale, "value_slider", "min=0.1;max=100.0;log=true;step=0.01"); add_member_control(this, "Step Size", h, "value_slider", "min=0.00001;max=0.1;log=true;step=0.000001"); add_member_control(this, "Apply Gravity", apply_gravity, "check", "shortcut='G'"); - add_member_control(this, "Foot Points", use_food_points, "check", "shortcut='F'"); + add_member_control(this, "Foot Points", use_foot_points, "check", "shortcut='F'"); add_member_control(this, "Show Boxes", show_boxes, "check", "shortcut='B'"); add_member_control(this, "Wireframe", wireframe, "check", "shortcut='W'"); add_member_control(this, "Show Centers", show_centers, "check", "shortcut='C'");