-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscene.h
70 lines (58 loc) · 1.44 KB
/
scene.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef SCENE_H_
#define SCENE_H_
#include <list>
#include "object.h"
#include "array.h"
#include "camera.h"
#include "stage.h"
#include "texture.h"
using namespace BE;
/*
*
* Programs window attributes
*
*/
namespace BE {
class Scene {
/*
*
* Scene is composed by objects, camera, light and player.
*
* Player is a pointer to an object which interacts with user
*
*/
bool _lightEnabled;
bool _textureEnabled;
public:
Scene();
~Scene();
Array<Vertex> vertexs;
Array<Mesh> meshes;
Array<Texture> textures;
Array<Object> objects;
Camera camera;
Stage *stage;
/* Singleton */
static Scene *inst;
static Scene *instance() {
if (!inst)
inst = new Scene;
return inst;
}
void loadProjection(const int &w, const int &h);
void initOpengl();
void initCamera();
void initStage();
void render();
void wireFrame();
void smoothShading();
void gouradShading();
void enableLight();
void disableLight();
void toggleLight();
void enableTexture();
void disableTexture();
void toggleTexture();
};
}
#endif /*Scene_H_*/