Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2008, 9:07:08 PM (16 years ago)
Author:
rgrieder
Message:
  • merged input branch back to trunk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/InputManager.h

    r1293 r1349  
    4242
    4343#include "ois/OIS.h"
     44#include "util/Math.h"
    4445#include "Tickable.h"
    4546#include "InputInterfaces.h"
     
    4748namespace orxonox
    4849{
     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
    4969  /**
    5070    @brief Captures and distributes mouse and keyboard input.
     
    85105    static bool isModifierDown(KeyboardModifier::Enum modifier);
    86106    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);
    89109
    90110    static void setWindowExtents(const int width, const int height);
     
    130150    void _destroyMouse();
    131151    void _destroyJoySticks();
     152
     153    void _updateTickables();
    132154
    133155    void tick(float dt);
     
    144166    bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
    145167    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);
    147169
    148170    static InputManager& _getSingleton();
     
    160182    unsigned int keyboardModifiers_;
    161183
     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
    162189    std::map<std::string, KeyHandler*>          keyHandlers_;
    163190    std::map<std::string, MouseHandler*>        mouseHandlers_;
     
    167194    std::vector<MouseHandler*>                  activeMouseHandlers_;
    168195    std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_;
     196    std::vector<InputTickable*>                 activeHandlers_;
    169197
    170198    std::vector<Key>                            keysDown_;
Note: See TracChangeset for help on using the changeset viewer.