#include <InputSystem.h>
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. |
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.
|
|
|
|
|
|
|
|
|
Constructs a new, uninitialized input system.
|
|
Add a new top-level adapter to listen for events.
|
|
Create the input system and set it up with the given config.
|
|
Destroy and clean up the input system.
|
|
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.
|
|
Get the joystick at the given position.
|
|
Get the number of current joysticks.
|
|
Gets the index of the given joysticks.
|
|
Get the keyboard at the given position.
|
|
Get the number of current keyboards.
|
|
Gets the index of the given keyboard.
|
|
Retrieve the mouse at the given position.
|
|
Get the number of current mouses.
|
|
Gets the index of the given mouse.
|
|
Remove an existing adapter.
|
|
Update the input system, capturing any new inputs.
|