X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fmetascene.h;h=0565f3d901b2d783420a83532fdb78b1cd2c958e;hp=e793a391776c56dd730461e69210bc4198ff53d8;hb=9480e20f4de41693ebd1f22e63d3bcecde878f70;hpb=84f1549d8146ac54574256ae0243747199e51151 diff --git a/src/metascene.h b/src/metascene.h index e793a39..0565f3d 100644 --- a/src/metascene.h +++ b/src/metascene.h @@ -1,13 +1,29 @@ #ifndef METASCENE_H_ #define METASCENE_H_ +#include +#include #include "scene.h" #include "mesh.h" +#include "geom.h" +#include "audio/ovstream.h" +#include "datamap.h" + + +struct FlatMirror { + Plane plane; // plane in local coordinates (original) + Plane wplane; // world coords plane (derived, identical to plane if node == 0) + float reflect; + std::vector objects; + SceneNode *node; + + FlatMirror *next; +}; + class MetaScene { public: - SceneSet *sceneman; - TextureSet *texman; + DataMap datamap; std::vector scenes; @@ -15,13 +31,32 @@ public: Vec3 start_pos; Quat start_rot; - MetaScene(SceneSet *sman, TextureSet *tman); + std::map scndata; + + FlatMirror *mirrors; + std::map objmirror; + + AudioStream *music; + + MetaScene(); ~MetaScene(); bool load(const char *fname); + bool scene_loaded(Scene *scn); 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 match_nodes(const char *qstr) const; + + Scene *extract_nodes(const char *qstr); + + int calc_mirror_planes(); }; #endif // METASCENE_H_