|
Last change
on this file since 9851 was
9851,
checked in by georgr, 12 years ago
|
|
A should fire main lazors now, second 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 | |
|---|
| 12 | class CommandExecutor; |
|---|
| 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 | CommandExecutor * CE; |
|---|
| 45 | }; |
|---|
| 46 | }; |
|---|
Note: See
TracBrowser
for help on using the repository browser.