evan 2026.1.4
Evan
Loading...
Searching...
No Matches
evan::XrManageActions Class Reference

The XrManageActions class is responsible for managing all action sets and actions in an OpenXR application. More...

#include <headers/evan/openxr/XrManageActions.hpp>

Inheritance diagram for evan::XrManageActions:
Collaboration diagram for evan::XrManageActions:

Public Member Functions

 XrManageActions (XrDeviceBackend &deviceBackend)
 Initializes XrManageActions with OpenXR action management.
 
std::vector< std::shared_ptr< utility::event::Event > > pollActions (XrDeviceBackend &deviceBackend)
 Polls for input events from the OpenXR runtime.
 

Public Attributes

XrActionSet _actionSet = XR_NULL_HANDLE
 The primary OpenXR action set for the application.
 
std::unique_ptr< XrHandsMotionActions > _handsMotionActions
 Action manager for hand tracking actions.
 
std::unique_ptr< XrManageButtonsActions > _manageButtonsActions
 Action manager for button actions.
 
std::unique_ptr< XrManageThumbStickActions > _manageThumbStickActions
 Action manager for thumb stick analog inputs.
 

Detailed Description

The XrManageActions class is responsible for managing all action sets and actions in an OpenXR application.

This class serves as a central point for creating and managing action sets and their associated actions, such as hand tracking actions. It provides an interface for initializing action sets, defining actions, and handling input from various XR devices. By encapsulating the action management functionality, this class simplifies the process of integrating input handling into an OpenXR application, allowing developers to focus on creating immersive experiences.

Definition at line 37 of file XrManageActions.hpp.

Constructor & Destructor Documentation

◆ XrManageActions()

evan::XrManageActions::XrManageActions ( XrDeviceBackend &  deviceBackend)

Initializes XrManageActions with OpenXR action management.

Constructs an XrManageActions instance and sets up all necessary OpenXR action handling including action set creation, hands motion and button input actions, space binding, and session attachment.

Parameters
deviceBackendReference to the XrDeviceBackend instance that manages the OpenXR device and session.

The constructor performs the following initialization steps in order:

  1. Creates the main action set
  2. Initializes hands motion action handler
  3. Initializes buttons action handler
  4. Binds all action sets to the device backend
  5. Creates spaces for hands motion tracking
  6. Attaches the action set to the active session
Note
The order of operations is critical for proper OpenXR initialization.
See also
XrHandsMotionActions, XrManageButtonsActions

Definition at line 11 of file XrManageActions.cpp.

◆ ~XrManageActions()

evan::XrManageActions::~XrManageActions ( )

Definition at line 35 of file XrManageActions.cpp.

Member Function Documentation

◆ pollActions()

std::vector< std::shared_ptr< utility::event::Event > > evan::XrManageActions::pollActions ( XrDeviceBackend &  deviceBackend)

Polls for input events from the OpenXR runtime.

This method queries the OpenXR runtime for the current state of all managed actions, including hand motion, button input, and thumb stick input. It generates a vector of events based on the retrieved state, which can be used by the application to respond to user input. The events may include information about hand positions, button presses, and thumb stick movements detected by the OpenXR runtime.

Parameters
deviceBackendReference to the XrDeviceBackend instance that manages the OpenXR device and session.
Returns
A vector of shared pointers to events representing the current state of all managed actions.

Definition at line 44 of file XrManageActions.cpp.

Member Data Documentation

◆ _actionSet

XrActionSet evan::XrManageActions::_actionSet = XR_NULL_HANDLE

The primary OpenXR action set for the application.

Contains and groups all OpenXR actions managed by XrManageActions.

Definition at line 93 of file XrManageActions.hpp.

◆ _handsMotionActions

std::unique_ptr<XrHandsMotionActions> evan::XrManageActions::_handsMotionActions

Action manager for hand tracking actions.

Manages hand motion actions (pose/aim/grip), related action spaces, and updates used for hand tracking input.

Definition at line 101 of file XrManageActions.hpp.

◆ _manageButtonsActions

std::unique_ptr<XrManageButtonsActions> evan::XrManageActions::_manageButtonsActions

Action manager for button actions.

Handles digital/button input actions (press/release) from controllers or other input devices.

Definition at line 109 of file XrManageActions.hpp.

◆ _manageThumbStickActions

std::unique_ptr<XrManageThumbStickActions> evan::XrManageActions::_manageThumbStickActions

Action manager for thumb stick analog inputs.

Handles thumb stick axes, analog motion and related input events.

Definition at line 116 of file XrManageActions.hpp.


The documentation for this class was generated from the following files: