select and move exhibits
[laserbrain_demo] / src / exhibit.h
index 63b2898..f331d99 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef EXHIBIT_H_
 #define EXHIBIT_H_
 
+#include <string>
 #include <gmath/gmath.h>
 #include "object.h"
 #include "geom.h"
+#include "audio/stream.h"
 
 class Exhibit;
 class ExhibitPriv;
@@ -21,6 +23,7 @@ public:
        void *data;
        Ray selray;
        Sphere selsphere;
+       float dist;
        unsigned int validmask;
 
        ExSelection(Exhibit *ex = 0);
@@ -28,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
@@ -38,6 +59,8 @@ private:
        ExhibitPriv *priv;
 
 public:
+       std::vector<ExData> data;
+
        Exhibit();
        virtual ~Exhibit();
 
@@ -49,11 +72,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_