Changeset 1323 for code/branches/input/src/core/InputManager.h
- Timestamp:
- May 19, 2008, 10:50:09 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/core/InputManager.h
r1293 r1323 42 42 43 43 #include "ois/OIS.h" 44 #include "util/Math.h" 44 45 #include "Tickable.h" 45 46 #include "InputInterfaces.h" … … 47 48 namespace orxonox 48 49 { 50 /** 51 * Helper class to realise a vector<int[4]> 52 */ 53 class POVStates 54 { 55 public: 56 int operator[](unsigned int index) { return povStates[index]; } 57 int povStates[4]; 58 }; 59 60 /** 61 * Helper class to realise a vector< {int[4], int[4]} > 62 */ 63 class SliderStates 64 { 65 public: 66 IntVector2 sliderStates[4]; 67 }; 68 49 69 /** 50 70 @brief Captures and distributes mouse and keyboard input. … … 85 105 static bool isModifierDown(KeyboardModifier::Enum modifier); 86 106 static bool isKeyDown(KeyCode::Enum key); 87 static const MouseState getMouseState();88 static const JoyStickState getJoyStickState(unsigned int ID);107 //static const MouseState getMouseState(); 108 //static const JoyStickState getJoyStickState(unsigned int ID); 89 109 90 110 static void setWindowExtents(const int width, const int height); … … 130 150 void _destroyMouse(); 131 151 void _destroyJoySticks(); 152 153 void _updateTickables(); 132 154 133 155 void tick(float dt); … … 144 166 bool sliderMoved (const OIS::JoyStickEvent &arg, int id); 145 167 bool povMoved (const OIS::JoyStickEvent &arg, int id); 146 bool vector3Moved (const OIS::JoyStickEvent &arg, int id);168 //bool vector3Moved (const OIS::JoyStickEvent &arg, int id); 147 169 148 170 static InputManager& _getSingleton(); … … 160 182 unsigned int keyboardModifiers_; 161 183 184 //! Keeps track of the joy stick POV states 185 std::vector<POVStates> povStates_; 186 //! Keeps track of the possibly two slider axes 187 std::vector<SliderStates> sliderStates_; 188 162 189 std::map<std::string, KeyHandler*> keyHandlers_; 163 190 std::map<std::string, MouseHandler*> mouseHandlers_; … … 167 194 std::vector<MouseHandler*> activeMouseHandlers_; 168 195 std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_; 196 std::vector<InputTickable*> activeHandlers_; 169 197 170 198 std::vector<Key> keysDown_;
Note: See TracChangeset
for help on using the changeset viewer.