projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed Makefile.mingw
[laserbrain_demo]
/
src
/
exhibit.h
diff --git
a/src/exhibit.h
b/src/exhibit.h
index
004626c
..
9b5c753
100644
(file)
--- a/
src/exhibit.h
+++ b/
src/exhibit.h
@@
-1,12
+1,15
@@
#ifndef EXHIBIT_H_
#define EXHIBIT_H_
#ifndef EXHIBIT_H_
#define EXHIBIT_H_
+#include <string>
#include <gmath/gmath.h>
#include "object.h"
#include "geom.h"
#include <gmath/gmath.h>
#include "object.h"
#include "geom.h"
+#include "audio/stream.h"
class Exhibit;
class Exhibit;
-class ExhibitPriv;
+class ExhibitSlot;
+class Scene;
enum {
EXSEL_RAY = 1,
enum {
EXSEL_RAY = 1,
@@
-15,11
+18,14
@@
enum {
class ExSelection {
public:
class ExSelection {
public:
+ static ExSelection null; // null selection
+
Exhibit *ex;
void *obj;
void *data;
Ray selray;
Sphere selsphere;
Exhibit *ex;
void *obj;
void *data;
Ray selray;
Sphere selsphere;
+ float dist;
unsigned int validmask;
ExSelection(Exhibit *ex = 0);
unsigned int validmask;
ExSelection(Exhibit *ex = 0);
@@
-27,6
+33,24
@@
public:
operator bool() const;
};
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
/* TODO
- select me aktina kai select me sfaira, epistrefei Selection
- hover me aktina kai hover me sfaira
@@
-34,23
+58,26
@@
public:
*/
class Exhibit : public Object {
private:
*/
class Exhibit : public Object {
private:
- ExhibitPriv *priv;
+ SceneNode *orig_parent;
public:
public:
+ ExhibitSlot *prev_slot;
+ std::vector<ExData> data;
+
Exhibit();
virtual ~Exhibit();
Exhibit(const Exhibit&) = delete;
Exhibit &operator =(const Exhibit &) = delete;
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 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 post_draw() const;
+ virtual const AABox &get_aabox() const override;
};
#endif // EXHIBIT_H_
};
#endif // EXHIBIT_H_