|
evan 2026.1.4
Evan
|
The XrManageButtonsActions class is responsible for managing button actions in an OpenXR application. This class encapsulates the functionality required to define and manage button actions, including creating action sets, defining button actions, and handling input from button devices. It provides an interface for integrating button input capabilities into an OpenXR application, allowing developers to create immersive experiences that utilize button presses and releases. More...
#include <headers/evan/openxr/actions/XrManageButtonsActions.hpp>


Public Member Functions | |
| XrManageButtonsActions (XrActionSet actionSet, XrDeviceBackend &deviceBackend) | |
| Constructs an XrManageButtonsActions instance with the specified action set and device backend. | |
| ~XrManageButtonsActions () | |
| Destructor for the XrManageButtonsActions class. This destructor is responsible for cleaning up any resources associated with the button actions, such as destroying action spaces and releasing OpenXR handles. It ensures that all resources are properly released when an instance of XrManageButtonsActions is destroyed. | |
| std::vector< std::shared_ptr< utility::event::Event > > | getEvents (XrDeviceBackend &deviceBackend, std::shared_ptr< utility::event::HandMotionEvent > handMotionLeftEvent, std::shared_ptr< utility::event::HandMotionEvent > handMotionRightEvent) |
| Retrieves the current state of the button actions and generates corresponding events. | |
Public Attributes | |
| std::unique_ptr< XrButtonAction > | _buttonAAction |
| Unique pointer to the action associated with the A button. | |
| std::unique_ptr< XrButtonAction > | _buttonBAction |
| Unique pointer to the action associated with the B button. | |
| std::unique_ptr< XrButtonAction > | _buttonXAction |
| Unique pointer to the action associated with the X button. | |
| std::unique_ptr< XrButtonAction > | _buttonYAction |
| Unique pointer to the action associated with the Menu button. | |
| std::unique_ptr< XrButtonAction > | _buttonMenuAction |
| Unique pointer to the action associated with the System button. | |
| std::unique_ptr< XrButtonAction > | _buttonSystemAction |
| Unique pointer to the action associated with the System button. | |
The XrManageButtonsActions class is responsible for managing button actions in an OpenXR application. This class encapsulates the functionality required to define and manage button actions, including creating action sets, defining button actions, and handling input from button devices. It provides an interface for integrating button input capabilities into an OpenXR application, allowing developers to create immersive experiences that utilize button presses and releases.
Definition at line 99 of file XrManageButtonsActions.hpp.
| evan::XrManageButtonsActions::XrManageButtonsActions | ( | XrActionSet | actionSet, |
| XrDeviceBackend & | deviceBackend | ||
| ) |
Constructs an XrManageButtonsActions instance with the specified action set and device backend.
This constructor initializes the button actions by creating the necessary OpenXR actions for button input based on the provided action set and device backend. It sets up the required action handles for button tracking and input management.
| actionSet | The OpenXR action set to which the button actions will belong. |
| deviceBackend | The device backend used for interacting with the OpenXR runtime and managing resources. |
Definition at line 67 of file XrManageButtonsActions.cpp.
| evan::XrManageButtonsActions::~XrManageButtonsActions | ( | ) |
Destructor for the XrManageButtonsActions class. This destructor is responsible for cleaning up any resources associated with the button actions, such as destroying action spaces and releasing OpenXR handles. It ensures that all resources are properly released when an instance of XrManageButtonsActions is destroyed.
Definition at line 19 of file XrManageButtonsActions.cpp.
| std::vector< std::shared_ptr< utility::event::Event > > evan::XrManageButtonsActions::getEvents | ( | evan::XrDeviceBackend & | deviceBackend, |
| std::shared_ptr< utility::event::HandMotionEvent > | handMotionLeftEvent, | ||
| std::shared_ptr< utility::event::HandMotionEvent > | handMotionRightEvent | ||
| ) |
Retrieves the current state of the button actions and generates corresponding events.
This method queries the OpenXR runtime for the current state of the button actions, such as whether specific buttons are pressed or released. It generates a vector of events based on the retrieved state, which can be used by the application to respond to button input. The events may include information about whether specific buttons are currently pressed or released, allowing the application to react accordingly.
| deviceBackend | The device backend used for interacting with the OpenXR runtime and managing resources. |
| handMotionLeftEvent | The hand motion event for the left hand. |
| handMotionRightEvent | The hand motion event for the right hand. |
Definition at line 161 of file XrManageButtonsActions.cpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonAAction |
Unique pointer to the action associated with the A button.
This member holds the action object responsible for handling input events related to the A button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 161 of file XrManageButtonsActions.hpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonBAction |
Unique pointer to the action associated with the B button.
This member holds the action object responsible for handling input events related to the B button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 170 of file XrManageButtonsActions.hpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonMenuAction |
Unique pointer to the action associated with the System button.
This member holds the action object responsible for handling input events related to the System button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 198 of file XrManageButtonsActions.hpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonSystemAction |
Unique pointer to the action associated with the System button.
This member holds the action object responsible for handling input events related to the System button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 208 of file XrManageButtonsActions.hpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonXAction |
Unique pointer to the action associated with the X button.
This member holds the action object responsible for handling input events related to the X button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 179 of file XrManageButtonsActions.hpp.
| std::unique_ptr<XrButtonAction> evan::XrManageButtonsActions::_buttonYAction |
Unique pointer to the action associated with the Menu button.
This member holds the action object responsible for handling input events related to the Menu button. It is initialized during the construction of the XrManageButtonsActions class.
Definition at line 188 of file XrManageButtonsActions.hpp.