Odyssey::InputSystem Class Reference

The singleton manager for all input in the system. More...

#include <InputSystem.h>

List of all members.

Public Types

typedef std::vector< OIS::Mouse * > MouseList
typedef std::vector< OIS::Keyboard * > KeyboardList
typedef std::vector< OIS::JoyStick * > JoyStickList
typedef std::vector< OIS::ForceFeedback * > ForceFeedbackList

Public Member Functions

 InputSystem ()
 Constructs a new, uninitialized input system.
void create (const Config &config)
 Create the input system and set it up with the given config.
void destroy ()
 Destroy and clean up the input system.
void update ()
 Update the input system, capturing any new inputs.
void addAdapter (InputAdapter *adapter)
 Add a new top-level adapter to listen for events.
void removeAdapter (InputAdapter *adapter)
 Remove an existing adapter.
OIS::Mouse * getMouse (uint32 index) const
 Retrieve the mouse at the given position.
uint32 getMouseCount () const
 Get the number of current mouses.
uint32 getMouseIndex (const OIS::Mouse *mouse) const
 Gets the index of the given mouse.
OIS::Keyboard * getKeyboard (uint32 index) const
 Get the keyboard at the given position.
uint32 getKeyboardCount () const
 Get the number of current keyboards.
uint32 getKeyboardIndex (const OIS::Keyboard *keyboard) const
 Gets the index of the given keyboard.
OIS::JoyStick * getJoyStick (uint32 index) const
 Get the joystick at the given position.
uint32 getJoyStickCount () const
 Get the number of current joysticks.
uint32 getJoyStickIndex (const OIS::JoyStick *joystick) const
 Gets the index of the given joysticks.
OIS::ForceFeedback * getForceFeedback (uint32 index) const
 Get the force feedback device at the given position.


Detailed Description

The singleton manager for all input in the system.

This is the manager for all input in the system. It handles creation, clean up and updating of the input system. It also contains an entry-point adapter which you can use to attach a multitude of adapters to listen for events.


Member Typedef Documentation

typedef std::vector<OIS::ForceFeedback*> Odyssey::InputSystem::ForceFeedbackList
 

typedef std::vector<OIS::JoyStick*> Odyssey::InputSystem::JoyStickList
 

typedef std::vector<OIS::Keyboard*> Odyssey::InputSystem::KeyboardList
 

typedef std::vector<OIS::Mouse*> Odyssey::InputSystem::MouseList
 


Constructor & Destructor Documentation

Odyssey::InputSystem::InputSystem  ) 
 

Constructs a new, uninitialized input system.


Member Function Documentation

void Odyssey::InputSystem::addAdapter InputAdapter adapter  ) 
 

Add a new top-level adapter to listen for events.

void Odyssey::InputSystem::create const Config config  ) 
 

Create the input system and set it up with the given config.

void Odyssey::InputSystem::destroy  ) 
 

Destroy and clean up the input system.

OIS::ForceFeedback* Odyssey::InputSystem::getForceFeedback uint32  index  )  const
 

Get the force feedback device at the given position.

This function returns the force feedback device at the given position. The number of force feedback devices will be the same as the number of joysticks. 0 may be returned indicating the joystick at that position does not support force feedback.

Parameters:
index the position at which to get the device

OIS::JoyStick* Odyssey::InputSystem::getJoyStick uint32  index  )  const
 

Get the joystick at the given position.

uint32 Odyssey::InputSystem::getJoyStickCount  )  const
 

Get the number of current joysticks.

uint32 Odyssey::InputSystem::getJoyStickIndex const OIS::JoyStick *  joystick  )  const
 

Gets the index of the given joysticks.

OIS::Keyboard* Odyssey::InputSystem::getKeyboard uint32  index  )  const
 

Get the keyboard at the given position.

uint32 Odyssey::InputSystem::getKeyboardCount  )  const
 

Get the number of current keyboards.

uint32 Odyssey::InputSystem::getKeyboardIndex const OIS::Keyboard *  keyboard  )  const
 

Gets the index of the given keyboard.

OIS::Mouse* Odyssey::InputSystem::getMouse uint32  index  )  const
 

Retrieve the mouse at the given position.

uint32 Odyssey::InputSystem::getMouseCount  )  const
 

Get the number of current mouses.

uint32 Odyssey::InputSystem::getMouseIndex const OIS::Mouse *  mouse  )  const
 

Gets the index of the given mouse.

void Odyssey::InputSystem::removeAdapter InputAdapter adapter  ) 
 

Remove an existing adapter.

void Odyssey::InputSystem::update  ) 
 

Update the input system, capturing any new inputs.


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:52 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO