#include <HapticDeviceEvent.h>
This event notifies about haptic device interaction. More...
This event notifies about haptic device interaction.
Public Member Functions | |
HapticDeviceEvent (const unsigned int id, const sofa::type::Vec3 &position, const sofa::type::Quat< SReal > &orientation, const unsigned char button) | |
Constructor. More... | |
~HapticDeviceEvent () override | |
Destructor. More... | |
SReal | getPosX (void) const |
Get the device X coordinate. More... | |
SReal | getPosY (void) const |
Get the device Y coordinate. More... | |
SReal | getPosZ (void) const |
Get the device Z coordinate. More... | |
sofa::type::Vec3 | getPosition (void) const |
Get the device coordinates. More... | |
sofa::type::Quat< SReal > | getOrientation (void) const |
Get the device orientation. More... | |
unsigned char | getButtonState () const |
Get the device button state. More... | |
bool | getButton (const int id=0) const |
unsigned int | getDeviceId () const |
Get the device Id. More... | |
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 | |
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... | |
sofa::core::objectmodel::HapticDeviceEvent::HapticDeviceEvent | ( | const unsigned int | id, |
const sofa::type::Vec3 & | position, | ||
const sofa::type::Quat< SReal > & | orientation, | ||
const unsigned char | button | ||
) |
Constructor.
|
override |
Destructor.
|
inline |
Get the device button state.
|
inlinestatic |
|
inline |
Get the device Id.
|
inline |
Get the device orientation.
|
inline |
Get the device coordinates.
|
inline |
Get the device X coordinate.
|
inline |
Get the device Y coordinate.
|
inline |
Get the device Z coordinate.