9ac90924ebb14395a89f5259600a05b41e2612af
[laserbrain_demo] / src / metascene.h
1 #ifndef METASCENE_H_
2 #define METASCENE_H_
3
4 #include <map>
5 #include "scene.h"
6 #include "mesh.h"
7 #include "datamap.h"
8
9 class MetaScene {
10 public:
11         DataMap datamap;
12
13         std::vector<Scene*> scenes;
14
15         Mesh *walk_mesh;
16         Vec3 start_pos;
17         Quat start_rot;
18
19         std::map<Scene*, void*> scndata;
20
21
22         MetaScene();
23         ~MetaScene();
24
25         bool load(const char *fname);
26         bool scene_loaded(Scene *scn);
27
28         void update(float dt);
29         void draw() const;
30
31         /* helper functions which end up calling the corresponding Scene functions
32          * for every scene
33          */
34         SceneNode *find_node(const char *name) const;
35         SceneNode *match_node(const char *qstr) const;
36         std::list<SceneNode*> match_nodes(const char *qstr) const;
37
38         Scene *extract_nodes(const char *qstr);
39 };
40
41 #endif  // METASCENE_H_