X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fexhibit.h;h=f331d9994236243556ac70992fb0a2c062837c0e;hp=004626c9d51d09d4e0c2469269492e14b2cb76bc;hb=b5ed5107e21ff834d5a4510b9047f976abb03dff;hpb=cddee551d9bc9ec58e15aeb673f7e8fcf3c163ce diff --git a/src/exhibit.h b/src/exhibit.h index 004626c..f331d99 100644 --- a/src/exhibit.h +++ b/src/exhibit.h @@ -1,12 +1,15 @@ #ifndef EXHIBIT_H_ #define EXHIBIT_H_ +#include #include #include "object.h" #include "geom.h" +#include "audio/stream.h" class Exhibit; class ExhibitPriv; +class Scene; enum { EXSEL_RAY = 1, @@ -20,6 +23,7 @@ public: void *data; Ray selray; Sphere selsphere; + float dist; unsigned int validmask; ExSelection(Exhibit *ex = 0); @@ -27,6 +31,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 @@ -37,20 +59,26 @@ private: ExhibitPriv *priv; public: + std::vector data; + Exhibit(); virtual ~Exhibit(); Exhibit(const Exhibit&) = delete; Exhibit &operator =(const Exhibit &) = delete; + virtual void set_node(SceneNode *node); + 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_