doesn't work
[laserbrain_demo] / src / exhibit.h
1 #ifndef EXHIBIT_H_
2 #define EXHIBIT_H_
3
4 #include <gmath/gmath.h>
5 #include "object.h"
6 #include "geom.h"
7
8 class Exhibit;
9 class ExhibitPriv;
10
11 enum {
12         EXSEL_RAY = 1,
13         EXSEL_SPHERE = 2
14 };
15
16 class ExSelection {
17 public:
18         Exhibit *ex;
19         void *obj;
20         void *data;
21         Ray selray;
22         Sphere selsphere;
23         unsigned int validmask;
24
25         ExSelection(Exhibit *ex = 0);
26
27         operator bool() const;
28 };
29
30 /* TODO
31 - select me aktina kai select me sfaira, epistrefei Selection
32 - hover me aktina kai hover me sfaira
33 - move me selection, origin, direction kai rotation (?)
34  */
35 class Exhibit : public Object {
36 private:
37         ExhibitPriv *priv;
38
39 public:
40         Exhibit();
41         virtual ~Exhibit();
42
43         Exhibit(const Exhibit&) = delete;
44         Exhibit &operator =(const Exhibit &) = delete;
45
46         virtual ExSelection select(const Ray &ray) const;
47         virtual ExSelection select(const Sphere &sph) const;
48
49         virtual void update(float dt = 0.0f);
50
51         virtual void pre_draw() const;
52         virtual void draw() const;
53         virtual void post_draw() const;
54 };
55
56 #endif  // EXHIBIT_H_