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

The XrButtonAction class represents an individual button action in an OpenXR application. More...

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

Inheritance diagram for evan::XrButtonAction:
Collaboration diagram for evan::XrButtonAction:

Public Member Functions

 XrButtonAction (utility::event::HandButtonEvent::Button buttonType=utility::event::HandButtonEvent::Button::Unknown)
 Constructs an XrButtonAction instance for a specific button type.
 
 ~XrButtonAction ()=default
 Destructor for the XrButtonAAction class.
 
std::vector< std::shared_ptr< utility::event::Event > > getEvent (XrDeviceBackend &deviceBackend, std::shared_ptr< utility::event::HandMotionEvent > handMotionEvent) override
 Retrieves the current state of the A button action and generates corresponding events.
 
- 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

The XrButtonAction class represents an individual button action in an OpenXR application.

This class encapsulates the functionality required to define and manage a specific button action, such as the A, B, X, Y, Menu, or System buttons. It provides an interface for retrieving the current state of the button action and generating corresponding events based on user input.

Definition at line 36 of file XrManageButtonsActions.hpp.

Constructor & Destructor Documentation

◆ XrButtonAction()

evan::XrButtonAction::XrButtonAction ( utility::event::HandButtonEvent::Button  buttonType = utility::event::HandButtonEvent::Button::Unknown)

Constructs an XrButtonAction instance for a specific button type.

Parameters
buttonTypeThe type of button this action represents (e.g., A, B, X, Y, Menu, System).

Definition at line 11 of file XrManageButtonsActions.cpp.

Member Function Documentation

◆ getEvent()

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

Retrieves the current state of the A button action and generates corresponding events.

This method queries the OpenXR runtime for the current state of the A button action, such as whether it is 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 the A button is currently pressed or released, allowing the application to react accordingly.

Parameters
deviceBackendThe device backend used for interacting with the OpenXR runtime and managing resources.
handMotionEventThe hand motion event associated with the button action, providing context for the button input.
Returns
A vector of unique pointers to events representing the current state of the A button action.

Implements evan::AXrAction.

Definition at line 29 of file XrManageButtonsActions.cpp.


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