orxonox::SimpleInputState Class Reference

#include <src/core/input/SimpleInputState.h>

Inheritance diagram for orxonox::SimpleInputState:

orxonox::InputState

List of all members.

Public Member Functions

bool setHandler (InputHandler *handler)
 Adds a handler of any kind. dynamic_cast determines to which list it is added.
bool setJoyStickHandler (JoyStickHandler *handler)
 Adds a joy stick handler.
bool setJoyStickHandler (JoyStickHandler *handler, unsigned int joyStickID)
 Adds a joy stick handler.
void setKeyHandler (KeyHandler *handler)
void setMouseHandler (MouseHandler *handler)

Private Member Functions

void joyStickAxisMoved (unsigned int joyStickID, unsigned int axis, float value)
void joyStickButtonHeld (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void joyStickButtonPressed (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void joyStickButtonReleased (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void keyHeld (const KeyEvent &evt)
void keyPressed (const KeyEvent &evt)
void keyReleased (const KeyEvent &evt)
void mouseButtonHeld (MouseButtonCode::ByEnum id)
void mouseButtonPressed (MouseButtonCode::ByEnum id)
void mouseButtonReleased (MouseButtonCode::ByEnum id)
void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
void mouseScrolled (int abs, int rel)
void numberOfJoySticksChanged (unsigned int n)
void onEnter ()
void onLeave ()
 SimpleInputState ()
void update ()
void updateInput (float dt, unsigned int device)
void updateInput (float dt)
 ~SimpleInputState ()

Private Attributes

std::vector< InputHandler * > allHandlers_
std::vector< JoyStickHandler * > joyStickHandler_
JoyStickHandlerjoyStickHandlerAll_
KeyHandlerkeyHandler_
MouseHandlermouseHandler_

Friends

class InputManager


Constructor & Destructor Documentation

orxonox::SimpleInputState::SimpleInputState (  )  [private]

orxonox::SimpleInputState::~SimpleInputState (  )  [inline, private]


Member Function Documentation

void orxonox::SimpleInputState::joyStickAxisMoved ( unsigned int  joyStickID,
unsigned int  axis,
float  value 
) [inline, private, virtual]

Implements orxonox::InputState.

References joyStickHandler_.

void orxonox::SimpleInputState::joyStickButtonHeld ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [inline, private, virtual]

Implements orxonox::InputState.

References joyStickHandler_.

void orxonox::SimpleInputState::joyStickButtonPressed ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [inline, private, virtual]

Implements orxonox::InputState.

References joyStickHandler_.

void orxonox::SimpleInputState::joyStickButtonReleased ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [inline, private, virtual]

Implements orxonox::InputState.

References joyStickHandler_.

void orxonox::SimpleInputState::keyHeld ( const KeyEvent evt  )  [inline, private, virtual]

void orxonox::SimpleInputState::keyPressed ( const KeyEvent evt  )  [private, virtual]

void orxonox::SimpleInputState::keyReleased ( const KeyEvent evt  )  [inline, private, virtual]

void orxonox::SimpleInputState::mouseButtonHeld ( MouseButtonCode::ByEnum  id  )  [inline, private, virtual]

void orxonox::SimpleInputState::mouseButtonPressed ( MouseButtonCode::ByEnum  id  )  [inline, private, virtual]

void orxonox::SimpleInputState::mouseButtonReleased ( MouseButtonCode::ByEnum  id  )  [inline, private, virtual]

void orxonox::SimpleInputState::mouseMoved ( IntVector2  abs,
IntVector2  rel,
IntVector2  clippingSize 
) [inline, private, virtual]

void orxonox::SimpleInputState::mouseScrolled ( int  abs,
int  rel 
) [inline, private, virtual]

void orxonox::SimpleInputState::numberOfJoySticksChanged ( unsigned int  n  )  [private, virtual]

void orxonox::SimpleInputState::onEnter (  )  [private, virtual]

void orxonox::SimpleInputState::onLeave (  )  [private, virtual]

bool orxonox::SimpleInputState::setHandler ( InputHandler handler  ) 

Adds a handler of any kind. dynamic_cast determines to which list it is added.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References setJoyStickHandler(), setKeyHandler(), and setMouseHandler().

Referenced by orxonox::GSMainMenu::activate(), orxonox::GSLevel::activate(), orxonox::GSLevel::deactivate(), orxonox::GSGraphics::deactivate(), and orxonox::InputManager::initialise().

bool orxonox::SimpleInputState::setJoyStickHandler ( JoyStickHandler handler  ) 

Adds a joy stick handler.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References joyStickHandler_, joyStickHandlerAll_, setJoyStickHandler(), and update().

bool orxonox::SimpleInputState::setJoyStickHandler ( JoyStickHandler handler,
unsigned int  joyStickID 
)

Adds a joy stick handler.

Parameters:
handler Pointer to the handler object.
joyStickID ID of the joy stick
Returns:
True if added, false otherwise.

References joyStickHandler_, and update().

Referenced by orxonox::GSMainMenu::activate(), orxonox::InGameConsole::bHidesAllInputChanged(), setHandler(), and setJoyStickHandler().

void orxonox::SimpleInputState::setKeyHandler ( KeyHandler handler  )  [inline]

void orxonox::SimpleInputState::setMouseHandler ( MouseHandler handler  )  [inline]

void orxonox::SimpleInputState::update (  )  [private]

void orxonox::SimpleInputState::updateInput ( float  dt,
unsigned int  device 
) [inline, private, virtual]

void orxonox::SimpleInputState::updateInput ( float  dt  )  [inline, private, virtual]

Implements orxonox::InputState.

References allHandlers_.


Friends And Related Function Documentation

friend class InputManager [friend]

Reimplemented from orxonox::InputState.


Member Data Documentation

Referenced by update(), and updateInput().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:23:03 2009 for Orxonox by  doxygen 1.5.6