blob: 96eab27fd83fdbe937d77f93407f3dc9d6346e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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_ */
|