GameEngine::InputManager Class Reference

#include <InputManager.h>

Inheritance diagram for GameEngine::InputManager:

Inheritance graph
[legend]
Collaboration diagram for GameEngine::InputManager:

Collaboration graph
[legend]
List of all members.

Detailed Description

The input manager is responsible for handling all game input tasks.

Definition at line 37 of file InputManager.h.

Public Member Functions

 InputManager (GameApp *application)
 ~InputManager ()
bool init ()
void update (const double &dt)
CEGUI::MouseButton convertOisButtonToCegui (OIS::MouseButtonID buttonId) const

Private Member Functions

bool keyPressed (const OIS::KeyEvent &arg)
bool keyReleased (const OIS::KeyEvent &arg)
bool mouseMoved (const OIS::MouseEvent &arg)
bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id)
bool mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id)

Private Attributes

GameAppmApplication
OIS::InputManager * mInputManager
OIS::Keyboard * mKeyboard
OIS::Mouse * mMouse


Constructor & Destructor Documentation

GameEngine::InputManager::InputManager ( GameApp application  ) 

Constructor

Parameters:
application The main application

Definition at line 33 of file InputManager.cpp.

GameEngine::InputManager::~InputManager (  ) 

Destructor

Definition at line 40 of file InputManager.cpp.


Member Function Documentation

bool GameEngine::InputManager::init (  )  [virtual]

Initialise the input manager

Returns:
True if initialised succesfully, false otherwise

Reimplemented from GameEngine::Process.

Definition at line 59 of file InputManager.cpp.

void GameEngine::InputManager::update ( const double &  dt  )  [virtual]

Update the input manager

Parameters:
dt Time since last frame

Reimplemented from GameEngine::Process.

Definition at line 114 of file InputManager.cpp.

CEGUI::MouseButton GameEngine::InputManager::convertOisButtonToCegui ( OIS::MouseButtonID  buttonId  )  const

Helper function to convert OIS mouse buttons ID to their recpective CEGUI IDs.

Parameters:
buttonId The OIS ID to be converted

Definition at line 123 of file InputManager.cpp.

bool GameEngine::InputManager::keyPressed ( const OIS::KeyEvent &  arg  )  [private]

Called by OIS, handles a key pressed event. Generates game engine event from OIS event and queues it with the event manager.

Parameters:
arg The event
Returns:
True to tell OIS the event was consumed, false otherwise.

Definition at line 142 of file InputManager.cpp.

bool GameEngine::InputManager::keyReleased ( const OIS::KeyEvent &  arg  )  [private]

Called by OIS, handles a key released event. Generates game engine event from OIS event and queues it with the event manager.

Parameters:
arg The event
Returns:
True to tell OIS the event was consumed, false otherwise.

Definition at line 150 of file InputManager.cpp.

bool GameEngine::InputManager::mouseMoved ( const OIS::MouseEvent &  arg  )  [private]

Called by OIS, handles a mouse moved event. Generates game engine event from OIS event and queues it with the event manager.

Parameters:
arg The event
Returns:
True to tell OIS the event was consumed, false otherwise.

Definition at line 157 of file InputManager.cpp.

bool GameEngine::InputManager::mousePressed ( const OIS::MouseEvent &  arg,
OIS::MouseButtonID  id 
) [private]

Called by OIS, handles a mouse button pressed event. Generates game engine event from OIS event and queues it with the event manager.

Parameters:
arg The event
Returns:
True to tell OIS the event was consumed, false otherwise.

Definition at line 164 of file InputManager.cpp.

bool GameEngine::InputManager::mouseReleased ( const OIS::MouseEvent &  arg,
OIS::MouseButtonID  id 
) [private]

Called by OIS, handles a mouse button released event. Generates game engine event from OIS event and queues it with the event manager.

Parameters:
arg The event
Returns:
True to tell OIS the event was consumed, false otherwise.

Definition at line 171 of file InputManager.cpp.


Member Data Documentation

GameApp* GameEngine::InputManager::mApplication [private]

Definition at line 70 of file InputManager.h.

OIS::InputManager* GameEngine::InputManager::mInputManager [private]

Definition at line 72 of file InputManager.h.

OIS::Keyboard* GameEngine::InputManager::mKeyboard [private]

Definition at line 73 of file InputManager.h.

OIS::Mouse* GameEngine::InputManager::mMouse [private]

Definition at line 74 of file InputManager.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 19 09:48:54 2007 for GameEngine by  doxygen 1.5.2