#include <JoystickEvent.h>
JoystickEvent Class. More...
JoystickEvent Class.
Classes | |
class | AxisEvent |
Implements an event that notifies about axis positions (like analog controls of a joystick). The axis position is normalized so values are always in the range [-1, 1]. More... | |
class | ButtonEvent |
Implements the button event for joysticks. More... | |
class | HatEvent |
Implements an event notifiying changes about a directionnal hat on a device (like a joystick). More... | |
Public Member Functions | |
Axis | |
const AxisEvent * | getAxisEvent (const int) const |
const std::vector< AxisEvent * > & | getAxisEvents (void) const |
unsigned int | getAxisEventsSize (void) const |
void | addAxisEvent (AxisEvent *) |
Button | |
ButtonEvent * | getButtonEvent (void) const |
bool | getButton (unsigned int) const |
void | setButtonEvent (ButtonEvent *) |
Public Member Functions inherited from sofa::core::objectmodel::Event | |
Event () | |
virtual | ~Event () |
void | setHandled () |
Tag the event as handled, i.e. the event needs not be propagated further. More... | |
bool | isHandled () const |
Returns true of the event has been handled. More... | |
virtual const char * | getClassName () const |
virtual size_t | getEventTypeIndex () const =0 |
Hat | |
std::vector< AxisEvent * > | axisEvents |
State of the Analogic Pad. More... | |
ButtonEvent * | buttonEvent |
State of the Joystick Buttons. More... | |
std::vector< HatEvent * > | hatEvents |
State of the directional cross. More... | |
const HatEvent * | getHatEvent (const int) const |
const std::vector< HatEvent * > & | getHatEvents (void) const |
unsigned int | getHatEventsSize (void) const |
void | addHatEvent (HatEvent *) |
JoystickEvent () | |
default constructor. More... | |
~JoystickEvent () override | |
default destructor. More... | |
static const char * | GetClassName () |
Additional Inherited Members | |
Protected Attributes inherited from sofa::core::objectmodel::Event | |
bool | m_handled |
Static Protected Attributes inherited from sofa::core::objectmodel::Event | |
static size_t | s_lastEventTypeIndex = 0 |
storing the last given id More... | |
Static Public Member Functions inherited from sofa::core::objectmodel::Event | |
static const char * | GetClassName () |
static size_t | getEventTypeCount () |
|
protected |
State of the Analogic Pad.
|
protected |
State of the Joystick Buttons.
|
protected |
State of the directional cross.
sofa::core::objectmodel::JoystickEvent::JoystickEvent | ( | ) |
default constructor.
|
override |
default destructor.
void sofa::core::objectmodel::JoystickEvent::addAxisEvent | ( | JoystickEvent::AxisEvent * | aEvent | ) |
void sofa::core::objectmodel::JoystickEvent::addHatEvent | ( | JoystickEvent::HatEvent * | hEvent | ) |
const JoystickEvent::AxisEvent * sofa::core::objectmodel::JoystickEvent::getAxisEvent | ( | const int | index | ) | const |
const std::vector< JoystickEvent::AxisEvent * > & sofa::core::objectmodel::JoystickEvent::getAxisEvents | ( | void | ) | const |
unsigned int sofa::core::objectmodel::JoystickEvent::getAxisEventsSize | ( | void | ) | const |
bool sofa::core::objectmodel::JoystickEvent::getButton | ( | unsigned int | buttonIndex | ) | const |
JoystickEvent::ButtonEvent * sofa::core::objectmodel::JoystickEvent::getButtonEvent | ( | void | ) | const |
|
inlinestatic |
const JoystickEvent::HatEvent * sofa::core::objectmodel::JoystickEvent::getHatEvent | ( | const int | index | ) | const |
const std::vector< JoystickEvent::HatEvent * > & sofa::core::objectmodel::JoystickEvent::getHatEvents | ( | void | ) | const |
unsigned int sofa::core::objectmodel::JoystickEvent::getHatEventsSize | ( | void | ) | const |
void sofa::core::objectmodel::JoystickEvent::setButtonEvent | ( | JoystickEvent::ButtonEvent * | bEvent | ) |