|
AGX Dynamics
2.35.0.1
|
#include <Joystick.h>
Inheritance diagram for agxSensor::JoystickListener:Public Types | |
| enum | CallbackMask { BUTTON = (1<<0) , AXIS = (1<<1) , POV = (1<<2) , SLIDER = (1<<3) , ALL } |
Public Member Functions | |
| JoystickListener () | |
| Default constructor for a joystick listener. More... | |
| JoystickListener (int mask) | |
| Create joystick listener given a callback mask (default ALL). More... | |
| virtual void | addNotification () |
| Called when this listener has been added to a JoystickManager. More... | |
| virtual bool | axisUpdate (const agxSensor::JoystickState &state, int axis) |
| Called when the manager has a new joystick state. More... | |
| virtual bool | buttonChanged (const agxSensor::JoystickState &state, int button, bool down) |
Called when button button changed state. More... | |
| int | getMask () const |
| virtual bool | povMoved (const agxSensor::JoystickState &state, int pov) |
Called when POV button pov has changed state. More... | |
| virtual void | removeNotification () |
| Called when this listener has been removed from a JoystickManager. More... | |
| void | setMask (int mask) |
| Assign new callback mask to this listener. More... | |
| virtual bool | sliderMoved (const agxSensor::JoystickState &state, int slider) |
Called when slider slider has changed state. More... | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Protected Member Functions | |
| virtual | ~JoystickListener () |
| JoystickManager * | getManager () |
| const JoystickManager * | getManager () const |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Definition at line 190 of file Joystick.h.
| Enumerator | |
|---|---|
| BUTTON | |
| AXIS | |
| POV | |
| SLIDER | |
| ALL | |
Definition at line 193 of file Joystick.h.
|
inline |
Default constructor for a joystick listener.
Default listens to all.
Definition at line 210 of file Joystick.h.
|
inline |
Create joystick listener given a callback mask (default ALL).
| mask | - callback mask (e.g., AXIS or (BUTTON | AXIS)) |
Definition at line 217 of file Joystick.h.
|
inlineprotectedvirtual |
Definition at line 284 of file Joystick.h.
|
inlinevirtual |
Called when this listener has been added to a JoystickManager.
Definition at line 265 of file Joystick.h.
|
virtual |
Called when the manager has a new joystick state.
This means that the value of the axis could be identical between different calls.
| state | - current state of the joystick |
| axis | - axis to check |
|
virtual |
Called when button button changed state.
| state | - current state of the joystick |
| button | - the button pressed or released |
| down | - true if button is down, otherwise false |
|
inlineprotected |
Definition at line 289 of file Joystick.h.
|
inlineprotected |
Definition at line 290 of file Joystick.h.
|
inline |
Definition at line 281 of file Joystick.h.
References agxSDK::EventListener::m_mask.
|
virtual |
Called when POV button pov has changed state.
| state | - current joystick state |
| pov | - POV that has changed state (state.pov[pov]) |
|
inlinevirtual |
Called when this listener has been removed from a JoystickManager.
Definition at line 270 of file Joystick.h.
|
inline |
Assign new callback mask to this listener.
| mask | - new callback mask |
Definition at line 276 of file Joystick.h.
|
virtual |
Called when slider slider has changed state.
| state | - current joystick state |
| slider | - slider that has changed state (state.slider[pov]) |