X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fexhibit.h;h=fd1d77b7ef94b7015d4871b64a9531f099502ad2;hp=63b289837ee707968e3517a910cf256337ab8f95;hb=91c5d07b779f24afec373047afe401b8811811c7;hpb=35c329e4b66fc60622080be1b9ff30148a7e74e4 diff --git a/src/exhibit.h b/src/exhibit.h index 63b2898..fd1d77b 100644 --- a/src/exhibit.h +++ b/src/exhibit.h @@ -1,12 +1,14 @@ #ifndef EXHIBIT_H_ #define EXHIBIT_H_ +#include #include #include "object.h" #include "geom.h" +#include "audio/stream.h" class Exhibit; -class ExhibitPriv; +class ExhibitSlot; class Scene; enum { @@ -16,11 +18,14 @@ enum { class ExSelection { public: + static ExSelection null; // null selection + Exhibit *ex; void *obj; void *data; Ray selray; Sphere selsphere; + float dist; unsigned int validmask; ExSelection(Exhibit *ex = 0); @@ -28,6 +33,24 @@ public: operator bool() const; }; +enum { + EXDATA_INFO, + EXDATA_VIDEO +}; + +class ExData { +public: + int type; + + std::string text; + AudioStream *voice; + // TODO: video stream + + ExData(); + ~ExData(); +}; + + /* TODO - select me aktina kai select me sfaira, epistrefei Selection - hover me aktina kai hover me sfaira @@ -35,9 +58,12 @@ public: */ class Exhibit : public Object { private: - ExhibitPriv *priv; + SceneNode *orig_parent; public: + ExhibitSlot *prev_slot; + std::vector data; + Exhibit(); virtual ~Exhibit(); @@ -49,11 +75,13 @@ public: virtual ExSelection select(const Ray &ray) const; virtual ExSelection select(const Sphere &sph) const; - virtual void update(float dt = 0.0f); + virtual void update(float dt = 0.0f) override; virtual void pre_draw() const; - virtual void draw() const; + virtual void draw() const override; virtual void post_draw() const; + + virtual const AABox &get_aabox() const override; }; #endif // EXHIBIT_H_