Last change
on this file since 9863 was
9853,
checked in by georgr, 11 years ago
|
A should fire main lazors now, 3rd try
|
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 | struct Orientation |
---|
12 | { |
---|
13 | float roll, pitch, yaw; |
---|
14 | }; |
---|
15 | |
---|
16 | class WiiMote : public InputDevice |
---|
17 | { |
---|
18 | |
---|
19 | public: |
---|
20 | //! Only resets the members |
---|
21 | WiiMote(unsigned int id, CWiimote & parent, CWii & parentWii); |
---|
22 | ~WiiMote() { } |
---|
23 | //! Returns the device class (derived) name as string |
---|
24 | std::string getClassName() const {return deviceName;} |
---|
25 | //! Updates the device which should in turn distribute events |
---|
26 | void update(const Clock& time); |
---|
27 | //! Clear all button related buffers |
---|
28 | void clearBuffers(); |
---|
29 | |
---|
30 | protected: |
---|
31 | void calibrationStarted() { } |
---|
32 | void calibrationStopped() { } |
---|
33 | Orientation lastOrientation; |
---|
34 | //! List of all input states that receive events from this device |
---|
35 | //std::vector<InputState*> inputStates_; |
---|
36 | |
---|
37 | private: |
---|
38 | static const std::string deviceName; |
---|
39 | void test(int x, int y); |
---|
40 | CWiimote * p; |
---|
41 | CWii * PWii; //parent "wii" the wiimote is registered to |
---|
42 | }; |
---|
43 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.