2a25f537ca09a078f685d4981d20474741020c4a
[laserbrain_demo] / src / vrinput.cc
1 #include <string.h>
2 #include <goatvr.h>
3 #include "vrinput.h"
4 #include "scene.h"
5
6 VRHand vrhand[2];
7
8 static Scene *scn;
9
10 bool init_vrhands()
11 {
12         scn = new Scene;
13         if(!(scn->load("data/vrhands.obj"))) {
14                 return false;
15         }
16         return true;
17 }
18
19 void destroy_vrhands()
20 {
21         delete scn;
22         scn = 0;
23 }
24
25 void update_vrhands()
26 {
27         for(int i=0; i<2; i++) {
28                 if(goatvr_hand_active(i)) {
29                         goatvr_hand_position(i, &vrhand[i].pos.x);
30                         goatvr_hand_orientation(i, &vrhand[i].rot.x);
31                         vrhand[i].valid = true;
32                 } else {
33                         vrhand[i].valid = false;
34                 }
35         }
36 }
37
38 void draw_vrhands()
39 {
40 }