![]() |
NDEVR
API Documentation
|
Provides standard logic shared across all hardware controllers to be used with the software. More...
Classes | |
| struct | ControlButton |
| Represents a digital button input on a controller. More... | |
| struct | ControllerInput |
| Base structure for all controller input types. More... | |
| struct | ControlStick |
| Represents an analog stick input on a controller. More... | |
| struct | ControlTrigger |
| Represents an analog trigger input on a controller. More... | |
| struct | HapticFeedback |
| Represents a haptic feedback output on a controller. More... | |
Public Member Functions | |
| virtual Buffer< Battery * > | batteries () const =0 |
| Returns the batteries associated with this controller. | |
| virtual Buffer< ControlButton > | centerButtons () const =0 |
| Returns the center buttons on the controller (e.g., start, select). | |
| virtual RGBColor | color () const =0 |
| Returns the current LED color of the controller, if supported. | |
| virtual Buffer< HapticFeedback > | hapticFeedback () const =0 |
| Returns the haptic feedback outputs available on this controller. | |
| virtual UUID | id () const =0 |
| Returns the unique identifier of this controller. | |
| virtual Buffer< ControlButton > | leftButtons () const =0 |
| Returns the left-side buttons on the controller (e.g., D-pad). | |
| virtual Buffer< ControlStick > | leftSticks () const =0 |
| Returns the left-side analog sticks on the controller. | |
| virtual Buffer< ControlTrigger > | leftTriggers () const =0 |
| Returns the left-side triggers on the controller. | |
| void | onUpdated () |
| Emitted after the controller state has been updated. | |
| virtual bool | requestColor (const RGBColor &color)=0 |
| Requests the controller LED to display the given color. | |
| virtual bool | requestVibrating (fltp08 left, fltp08 right)=0 |
| Requests the controller to vibrate with the given intensities. | |
| virtual Buffer< ControlButton > | rightButtons () const =0 |
| Returns the right-side buttons on the controller. | |
| virtual Buffer< ControlStick > | rightSticks () const =0 |
| Returns the right-side analog sticks on the controller. | |
| virtual Buffer< ControlTrigger > | rightTriggers () const =0 |
| Returns the right-side triggers on the controller. | |
| virtual void | setWindowInstance (WindowInstance *) |
| Associates a window instance with this controller for input routing. | |
| virtual void | updateState ()=0 |
| Polls the controller hardware and updates the internal input state. | |
| virtual Vector< 2, fltp08 > | vibration () const =0 |
| Returns the current vibration intensity for both motors. | |
Provides standard logic shared across all hardware controllers to be used with the software.
Definition at line 18 of file ControllerInterface.h.
Returns the batteries associated with this controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the center buttons on the controller (e.g., start, select).
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the current LED color of the controller, if supported.
Implemented in DualSenseController, and XBoxController.
Referenced by requestColor().
|
pure virtual |
Returns the haptic feedback outputs available on this controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the unique identifier of this controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the left-side buttons on the controller (e.g., D-pad).
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the left-side analog sticks on the controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the left-side triggers on the controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Requests the controller LED to display the given color.
| [in] | color | The desired LED color. |
Implemented in DualSenseController, and XBoxController.
References color().
Requests the controller to vibrate with the given intensities.
| [in] | left | Left motor intensity from 0 (off) to 1 (full vibration). |
| [in] | right | Right motor intensity from 0 (off) to 1 (full vibration). |
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the right-side buttons on the controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the right-side analog sticks on the controller.
Implemented in DualSenseController, and XBoxController.
|
pure virtual |
Returns the right-side triggers on the controller.
Implemented in DualSenseController, and XBoxController.
|
inlinevirtual |
Associates a window instance with this controller for input routing.
| [in] | WindowInstance | pointer to associate. Can be nullptr. |
Reimplemented in DualSenseController.
Definition at line 189 of file ControllerInterface.h.
Returns the current vibration intensity for both motors.
Implemented in DualSenseController, and XBoxController.