mirror planes detection needs work
[laserbrain_demo] / src / metascene.h
index 5d57ee0..6987f00 100644 (file)
@@ -1,14 +1,28 @@
 #ifndef METASCENE_H_
 #define METASCENE_H_
 
+#include <vector>
 #include <map>
 #include "scene.h"
 #include "mesh.h"
+#include "geom.h"
+#include "audio/ovstream.h"
+#include "datamap.h"
+
+
+struct FlatMirror {
+       Plane plane;
+       float reflect;
+       std::vector<Object*> objects;
+       SceneNode *node;
+
+       FlatMirror *next;
+};
+
 
 class MetaScene {
 public:
-       SceneSet *sceneman;
-       TextureSet *texman;
+       DataMap datamap;
 
        std::vector<Scene*> scenes;
 
@@ -18,8 +32,12 @@ public:
 
        std::map<Scene*, void*> scndata;
 
+       FlatMirror *mirrors;
+       std::map<Object*, FlatMirror*> objmirror;
 
-       MetaScene(SceneSet *sman, TextureSet *tman);
+       AudioStream *music;
+
+       MetaScene();
        ~MetaScene();
 
        bool load(const char *fname);
@@ -27,6 +45,17 @@ public:
 
        void update(float dt);
        void draw() const;
+
+       /* helper functions which end up calling the corresponding Scene functions
+        * for every scene
+        */
+       SceneNode *find_node(const char *name) const;
+       SceneNode *match_node(const char *qstr) const;
+       std::list<SceneNode*> match_nodes(const char *qstr) const;
+
+       Scene *extract_nodes(const char *qstr);
+
+       int calc_mirror_planes();
 };
 
 #endif // METASCENE_H_