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