From 2b0823d89312b90cb6e5fdd4f68171353f9de13b Mon Sep 17 00:00:00 2001 From: Jerboa-app Date: Tue, 5 Mar 2024 07:40:29 +0000 Subject: [PATCH] adds getting timestep, subsamples, gravity and its direction --- include/System/Physics/sPhysics.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/System/Physics/sPhysics.h b/include/System/Physics/sPhysics.h index 5fde3930..f9d5d7b0 100644 --- a/include/System/Physics/sPhysics.h +++ b/include/System/Physics/sPhysics.h @@ -145,8 +145,14 @@ namespace Hop::System::Physics } void setTimeStep(double delta){dt = delta; dtdt = dt*dt;} + double getTimeStep() const { return dt; } + void setSubSamples(unsigned s){subSamples = s;} + unsigned getSubSamples() const { return subSamples; } + void setGravity(double g, double nx, double ny){gravity = g; ngx = nx; ngy = ny;} + double getGravity() const { return gravity; } + glm::vec2 getGravityDirection() const { return glm::vec2(ngx, ngy); } // Lua