]> git.localhorst.tv Git - gong.git/blobdiff - src/physics/Simulation.hpp
simple physics simulation
[gong.git] / src / physics / Simulation.hpp
diff --git a/src/physics/Simulation.hpp b/src/physics/Simulation.hpp
new file mode 100644 (file)
index 0000000..9d41877
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef GONG_PHYSICS_SIMULATION_HPP_
+#define GONG_PHYSICS_SIMULATION_HPP_
+
+#include "../graphics/glm.hpp"
+
+#include <vector>
+
+
+namespace gong {
+namespace physics {
+
+struct Derivative;
+struct Object;
+struct State;
+
+class Simulation {
+
+public:
+       void Update(float dt);
+
+private:
+       void Integrate(State &, float dt);
+       Derivative Evaluate(const State &, float dt, const Derivative &);
+
+private:
+       std::vector<Object *> objects;
+       glm::vec3 gravity;
+
+};
+
+}
+}
+
+#endif