Last change
on this file since 9838 was
9838,
checked in by georgr, 10 years ago
|
developing on 2 PCs is a lot of fun, bluetooth is a rare commodity… wiimote should connect properly now
|
File size:
1.1 KB
|
Line | |
---|
1 | |
---|
2 | #include "InputDevice.h" |
---|
3 | //#include "InputManager.h" |
---|
4 | |
---|
5 | #include <wiicpp/wiicpp/wiicpp.h> |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | namespace orxonox |
---|
10 | { |
---|
11 | |
---|
12 | |
---|
13 | struct Orientation |
---|
14 | { |
---|
15 | float roll, pitch, yaw; |
---|
16 | }; |
---|
17 | |
---|
18 | class WiiMote : public InputDevice |
---|
19 | { |
---|
20 | |
---|
21 | public: |
---|
22 | //! Only resets the members |
---|
23 | WiiMote(unsigned int id, CWiimote & parent, CWii & parentWii); |
---|
24 | ~WiiMote() { } |
---|
25 | //! Returns the device class (derived) name as string |
---|
26 | std::string getClassName() const {return deviceName;} |
---|
27 | //! Updates the device which should in turn distribute events |
---|
28 | void update(const Clock& time); |
---|
29 | //! Clear all button related buffers |
---|
30 | void clearBuffers(); |
---|
31 | |
---|
32 | protected: |
---|
33 | void calibrationStarted() { } |
---|
34 | void calibrationStopped() { } |
---|
35 | Orientation lastOrientation; |
---|
36 | //! List of all input states that receive events from this device |
---|
37 | //std::vector<InputState*> inputStates_; |
---|
38 | |
---|
39 | private: |
---|
40 | static const std::string deviceName; |
---|
41 | void test(int x, int y); |
---|
42 | CWiimote * p; |
---|
43 | CWii * PWii; //parent "wii" the wiimote is registered to |
---|
44 | }; |
---|
45 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.