Orxonox
0.0.5 Codename: Arcturus
|
Abstract base class for all input devices (mouse, keyboard and joy sticks). More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/input/InputDevice.h>
Public Member Functions | |
InputDevice (unsigned int id) | |
Only resets the members. More... | |
virtual | ~InputDevice ()=default |
virtual void | clearBuffers ()=0 |
Clear all button related buffers. More... | |
virtual std::string | getClassName () const =0 |
Returns the device class (derived) name as string. More... | |
unsigned int | getDeviceID () const |
Returns the ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard) More... | |
std::vector< InputState * > & | getStateListRef () |
Returns a reference to the internal input state vector. Use with care! More... | |
bool | isCalibrating () const |
Tells whether the device is in calibration mode. More... | |
void | startCalibration () |
Start calibrating (only useful for joy sticks) More... | |
void | stopCalibration () |
Stop calibrating and evaluate the data (only useful for joy sticks) More... | |
virtual void | update (const Clock &time)=0 |
Updates the device which should in turn distribute events. More... | |
Protected Member Functions | |
virtual void | calibrationStarted () |
To be ovrridden by the subclass. More... | |
virtual void | calibrationStopped () |
To be ovrridden by the subclass. More... | |
Protected Attributes | |
std::vector< InputState * > | inputStates_ |
List of all input states that receive events from this device. More... | |
Private Member Functions | |
InputDevice (const InputDevice &)=delete | |
InputDevice & | operator= (const InputDevice &)=delete |
Private Attributes | |
bool | bCalibrating_ |
Whether the device is in calibration mode. More... | |
const unsigned int | deviceID_ |
ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard) More... | |
Abstract base class for all input devices (mouse, keyboard and joy sticks).
It provides common virtual functions to be used by the InputManager.
|
inline |
Only resets the members.
|
virtualdefault |
|
privatedelete |
|
inlineprotectedvirtual |
To be ovrridden by the subclass.
Reimplemented in orxonox::JoyStick.
|
inlineprotectedvirtual |
To be ovrridden by the subclass.
Reimplemented in orxonox::JoyStick.
|
pure virtual |
Clear all button related buffers.
Implemented in orxonox::InputDeviceTemplated< Traits >, orxonox::InputDeviceTemplated< MouseTraits >, orxonox::InputDeviceTemplated< KeyboardTraits >, and orxonox::InputDeviceTemplated< JoyStickTraits >.
|
pure virtual |
Returns the device class (derived) name as string.
Implemented in orxonox::InputDeviceTemplated< Traits >, orxonox::InputDeviceTemplated< MouseTraits >, orxonox::InputDeviceTemplated< KeyboardTraits >, and orxonox::InputDeviceTemplated< JoyStickTraits >.
|
inline |
Returns the ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard)
|
inline |
Returns a reference to the internal input state vector. Use with care!
|
inline |
Tells whether the device is in calibration mode.
|
privatedelete |
|
inline |
Start calibrating (only useful for joy sticks)
|
inline |
Stop calibrating and evaluate the data (only useful for joy sticks)
Updates the device which should in turn distribute events.
Implemented in orxonox::InputDeviceTemplated< Traits >, orxonox::InputDeviceTemplated< MouseTraits >, orxonox::InputDeviceTemplated< KeyboardTraits >, and orxonox::InputDeviceTemplated< JoyStickTraits >.
|
private |
Whether the device is in calibration mode.
|
private |
ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard)
|
protected |
List of all input states that receive events from this device.