SOFA API  1e111313
Open source framework for multi-physics simuation
sofa::core::objectmodel::JoystickEvent Class Reference

#include <JoystickEvent.h>

JoystickEvent Class. More...

Inheritance diagram for sofa::core::objectmodel::JoystickEvent:

Detailed Description


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...

Protected Attributes

std::vector< AxisEvent * > axisEvents
 State of the Analogic Pad. More...
 State of the Joystick Buttons. More...
std::vector< HatEvent * > hatEvents
 State of the directional cross. More...
- Protected Attributes inherited from sofa::core::objectmodel::Event
bool m_handled

Public Member Functions

 JoystickEvent ()
 default constructor. More...
 ~JoystickEvent () override
 default destructor. More...
const AxisEventgetAxisEvent (const int) const
const std::vector< AxisEvent * > & getAxisEvents (void) const
unsigned int getAxisEventsSize (void) const
void addAxisEvent (AxisEvent *)
ButtonEventgetButtonEvent (void) const
bool getButton (unsigned int) const
void setButtonEvent (ButtonEvent *)
const HatEventgetHatEvent (const int) const
const std::vector< HatEvent * > & getHatEvents (void) const
unsigned int getHatEventsSize (void) const
void addHatEvent (HatEvent *)
- 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

Static Public Member Functions

static const char * GetClassName ()
- Static Public Member Functions inherited from sofa::core::objectmodel::Event
static const char * GetClassName ()
static size_t getEventTypeCount ()

Additional Inherited Members

- Static Protected Attributes inherited from sofa::core::objectmodel::Event
static size_t s_lastEventTypeIndex = 0
 storing the last given id More...

Attribute details

std::vector< AxisEvent* > sofa::core::objectmodel::JoystickEvent::axisEvents

State of the Analogic Pad.

ButtonEvent* sofa::core::objectmodel::JoystickEvent::buttonEvent

State of the Joystick Buttons.

std::vector< HatEvent* > sofa::core::objectmodel::JoystickEvent::hatEvents

State of the directional cross.

Constructor details

sofa::core::objectmodel::JoystickEvent::JoystickEvent ( )

default constructor.

sofa::core::objectmodel::JoystickEvent::~JoystickEvent ( )

default destructor.

Function details

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
static const char* sofa::core::objectmodel::JoystickEvent::GetClassName ( )
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)