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

Represents an OpenXR action for thumb stick input from hand tracking devices. More...

#include <headers/evan/openxr/actions/XrManageThumbStickActions.hpp>

Inheritance diagram for evan::XrHandThumbStickAction:
Collaboration diagram for evan::XrHandThumbStickAction:

Public Member Functions

 XrHandThumbStickAction (utility::event::HandEvent::HandType handType)
 Constructs an XrHandThumbStickAction instance for the specified hand type.
 
 ~XrHandThumbStickAction ()
 Destructor for the XrHandThumbStickAction class.
 
std::vector< std::shared_ptr< utility::event::Event > > getEvent (evan::XrDeviceBackend &deviceBackend, std::shared_ptr< utility::event::HandMotionEvent > handMotionEvent) override
 Retrieves the current thumb stick events from the device backend.
 
- Public Member Functions inherited from evan::AXrAction
virtual ~AXrAction ()
 Destructor for AXrAction, responsible for cleaning up OpenXR resources.
 
XrAction getAction () const
 Retrieves the XrAction handle associated with this AXrAction.
 
const std::string & getActionName () const
 Retrieves the name of the action.
 
const std::string & getBindingPath () const
 Retrieves the binding path of the action.
 
void createAction (const PropertiesXrActions &properties)
 Creates an OpenXR action based on the provided properties.
 

Detailed Description

Represents an OpenXR action for thumb stick input from hand tracking devices.

This class encapsulates the functionality required to define and manage a thumb stick action for hand tracking devices in an OpenXR application. It provides an interface for retrieving thumb stick events based on the current state of the thumb stick input detected by the OpenXR runtime.

Definition at line 35 of file XrManageThumbStickActions.hpp.

Constructor & Destructor Documentation

◆ XrHandThumbStickAction()

evan::XrHandThumbStickAction::XrHandThumbStickAction ( utility::event::HandEvent::HandType  handType)

Constructs an XrHandThumbStickAction instance for the specified hand type.

This constructor initializes the thumb stick action for a specific hand (left or right) by creating the necessary OpenXR action and setting up the required resources for tracking thumb stick input from hand tracking devices.

Parameters
handTypeThe type of hand (left or right) for which to create the thumb stick action.

Definition at line 11 of file XrManageThumbStickActions.cpp.

◆ ~XrHandThumbStickAction()

evan::XrHandThumbStickAction::~XrHandThumbStickAction ( )

Destructor for the XrHandThumbStickAction class.

This destructor is responsible for cleaning up any resources associated with the thumb stick action, such as destroying action spaces and releasing OpenXR handles. It ensures that all resources are properly released when an instance of XrHandThumbStickAction is destroyed.

Definition at line 19 of file XrManageThumbStickActions.cpp.

Member Function Documentation

◆ getEvent()

std::vector< std::shared_ptr< utility::event::Event > > evan::XrHandThumbStickAction::getEvent ( evan::XrDeviceBackend &  deviceBackend,
std::shared_ptr< utility::event::HandMotionEvent >  handMotionEvent 
)
overridevirtual

Retrieves the current thumb stick events from the device backend.

This method queries the device backend for the current state of thumb stick input and generates a list of events based on the thumb stick movements and gestures detected. It returns a vector of unique pointers to Event objects representing the thumb stick events that have occurred since the last query.

Parameters
deviceBackendThe device backend used for interacting with the OpenXR runtime and managing resources.
handMotionEventOptional shared pointer to a HandMotionEvent that may be used to provide context for hand-related actions. This parameter can be nullptr if the action is not related to hand motion.
Returns
A vector of unique pointers to Event objects representing the thumb stick events.

Implements evan::AXrAction.

Definition at line 30 of file XrManageThumbStickActions.cpp.


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