Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/libraries/core/input/WiiMote.h @ 9917

Last change on this file since 9917 was 9911, checked in by georgr, 10 years ago

watch out for sensitivity! IR input now working, still trying to fix roll

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
9namespace 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                Orientation averageOrientation(Orientation o[], int l);
35
36         private:
37                 static const std::string deviceName;
38                 void test(int x, int y);
39                 CWiimote * p;
40                 CWii * PWii; //parent "wii" the wiimote is registered to
41                 IntVector2 lastCursor;
42        };
43};
Note: See TracBrowser for help on using the repository browser.