summaryrefslogtreecommitdiffstats
path: root/Engine.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-03-01 23:30:40 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-03-01 23:30:40 +0100
commit070051b8759806873267cff46ceb2be7d6a3262f (patch)
treea19b03e51847d3dee10514e456a4c7921b306b3e /Engine.h
downloadheadshot-070051b8759806873267cff46ceb2be7d6a3262f.tar
headshot-070051b8759806873267cff46ceb2be7d6a3262f.zip
initial commit
Diffstat (limited to 'Engine.h')
-rw-r--r--Engine.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/Engine.h b/Engine.h
new file mode 100644
index 0000000..96eab27
--- /dev/null
+++ b/Engine.h
@@ -0,0 +1,44 @@
+/*
+ * Engine.h
+ *
+ * Created on: 24.02.2010
+ * Author: constantin
+ */
+
+#ifndef ENGINE_H_
+#define ENGINE_H_
+
+#include "gl.h"
+#include "Keys.h"
+#include "Triangle.h"
+#include "Cuboid.h"
+#include <list>
+
+class Engine
+{
+ public:
+ Engine();
+ virtual ~Engine();
+
+ void renderScene(unsigned long delta, const Keyset &keys);
+
+ private:
+ static const float PLAYER_SPEED;
+ vmml::vec3f playerPos;
+ vmml::mat4f playerRotY;
+ float playerRotX;
+
+ struct Renderer {
+ void operator() (const Triangle &t) const {
+ t.render();
+ }
+ };
+ static Renderer render;
+
+ std::list<Triangle> triangles;
+
+ void run(unsigned long delta, const Keyset &keys);
+
+};
+
+#endif /* ENGINE_H_ */