From 0b93d2dd9bef26da58b42aa370b1e6e4f7adfd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9?= <noe.artru@polytechnique.org> Date: Tue, 16 May 2023 11:02:04 +0200 Subject: [PATCH] Timer RAS --- projet-code/scenes_inf443/base/src/scene.cpp | 6 +++--- projet-code/scenes_inf443/base/src/scene.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projet-code/scenes_inf443/base/src/scene.cpp b/projet-code/scenes_inf443/base/src/scene.cpp index 4182303..f159a34 100644 --- a/projet-code/scenes_inf443/base/src/scene.cpp +++ b/projet-code/scenes_inf443/base/src/scene.cpp @@ -236,7 +236,7 @@ void scene_structure::display_bat(vec3 p) - //Orientation and position of the bird along the path + //Orientation and position of the bat along the path float t = timer_mvt.t; vec3 p2; if (t + 0.1f > timer_mvt.t_max) p2 = interpolation(0.01f, keyframe.key_positions, keyframe.key_times, gui.k); @@ -356,7 +356,7 @@ void scene_structure::display_gui() void scene_structure::display_ball() { - bouncing.simulate(timer_chain.scale * 0.01f, terrain_length); + bouncing.simulate(timer.scale * 0.01f, terrain_length); for (int i = 0; i < bouncing.N; i++) { bouncing.mesh.model.translation = bouncing.pos[i]; bouncing.mesh.material.color = bouncing.color[i]; @@ -366,7 +366,7 @@ void scene_structure::display_ball() { void scene_structure::display_projectiles() { - projectiles.simulate(timer_chain.scale * 0.03f, terrain_length); + projectiles.simulate(timer.scale * 0.03f, terrain_length); for (int i = 0; i < projectiles.N; i++) { projectiles.mesh.model.translation = projectiles.pos[i]; projectiles.mesh.material.color = projectiles.color[i]; diff --git a/projet-code/scenes_inf443/base/src/scene.hpp b/projet-code/scenes_inf443/base/src/scene.hpp index 19fa3bb..ca67d62 100644 --- a/projet-code/scenes_inf443/base/src/scene.hpp +++ b/projet-code/scenes_inf443/base/src/scene.hpp @@ -47,10 +47,10 @@ struct scene_structure : cgp::scene_inputs_generic { // ****************************** // // Elements and shapes of the scene // ****************************** // - - // Timer used for the animation + cgp::skybox_drawable skybox; + // Timer used for the animation timer_basic timer; cgp::mesh_drawable terrain; -- GitLab