-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scene.h
48 lines (43 loc) · 1.27 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
/* This class wraps all of the information for a scene. Meshes, Caameras, materials, etc.
* While the resource manager is the class that is responsible for loading classes, for loading all
* assets, the scene class will be the one that lets the resource manager know what needs to be
* loaded as the resource manager doesn't do anything on its own.
*/
#ifndef SCENE_H
#define SCENE_H
#include <vector>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string>
#include <fstream>
#include <stack>
#include "Object.cpp"
#include "GeoObject.cpp"
#include "Camera.cpp"
#include "ResourceManager.cpp"
#include "Program.cpp"
#include "Model.cpp"
#include "Interface.cpp"
using namespace std;
using namespace pugi;
class Scene: public Object //yup, scenes are objects to, they need to be globably addressable.
{
public:
Scene(const char* config);
Scene(xml_node config);
void load(xml_node self, Object* parent, string path);
void update();//advised to call before calling render.
void render();
void bindToProgram(Program *prog, GLint local);
void bindToProgram(int val);
virtual bool onEvent(const Event& event);
//private:
vector<Model*> models;
vector<Camera*> cameras;
vector<Program*> programs;
Camera* viewPoint;
Program* renderer;
};
#endif
/*.S.D.G.*/