]> git.localhorst.tv Git - gong.git/blob - src/physics/Simulation.hpp
simple physics simulation
[gong.git] / src / physics / Simulation.hpp
1 #ifndef GONG_PHYSICS_SIMULATION_HPP_
2 #define GONG_PHYSICS_SIMULATION_HPP_
3
4 #include "../graphics/glm.hpp"
5
6 #include <vector>
7
8
9 namespace gong {
10 namespace physics {
11
12 struct Derivative;
13 struct Object;
14 struct State;
15
16 class Simulation {
17
18 public:
19         void Update(float dt);
20
21 private:
22         void Integrate(State &, float dt);
23         Derivative Evaluate(const State &, float dt, const Derivative &);
24
25 private:
26         std::vector<Object *> objects;
27         glm::vec3 gravity;
28
29 };
30
31 }
32 }
33
34 #endif