]> git.localhorst.tv Git - gong.git/blob - src/physics/Simulation.hpp
half-{complete,assed} sphere collision detection
[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 Contact;
13 struct Derivative;
14 struct Object;
15 struct State;
16
17 class Simulation {
18
19 public:
20         void Update(float dt);
21
22 private:
23         void Integrate(State &, float dt);
24         Derivative Evaluate(const State &, float dt, const Derivative &);
25
26 private:
27         std::vector<Object *> objects;
28         std::vector<Contact> contacts;
29         glm::vec3 gravity;
30
31 };
32
33 }
34 }
35
36 #endif