doesn't work
[laserbrain_demo] / src / exhibit.cc
1 #include "exhibit.h"
2 #include "snode.h"
3
4 class ExhibitPriv {
5         Vec3 orig_pos;
6         Quat orig_rot;
7         SceneNode *orig_node;
8 };
9
10 ExSelection::ExSelection(Exhibit *ex)
11 {
12         this->ex = ex;
13         obj = data = 0;
14         validmask = 0;
15 }
16
17 ExSelection::operator bool() const
18 {
19         return ex != 0;
20 }
21
22 Exhibit::Exhibit()
23 {
24         priv = new ExhibitPriv;
25         priv->orig_node = 0;
26 }
27
28 Exhibit::~Exhibit()
29 {
30         delete priv;
31 }
32
33 ExSelection Exhibit::select(const Ray &ray) const
34 {
35         return ExSelection(0);
36 }
37
38 ExSelection Exhibit::select(const Sphere &sph) const
39 {
40         return ExSelection(0);
41 }
42
43 void Exhibit::update(float dt)
44 {
45 }
46
47 void Exhibit::pre_draw() const
48 {
49         if(node) {
50                 glMatrixMode(GL_MODELVIEW);
51                 glPushMatrix();
52                 glMultMatrixf(node->get_matrix()[0]);
53         }
54 }
55
56 void Exhibit::draw() const
57 {
58 }
59
60 void Exhibit::post_draw() const
61 {
62         if(node) {
63                 glMatrixMode(GL_MODELVIEW);
64                 glPopMatrix();
65         }
66 }