evan 2026.1.4
Evan
Loading...
Searching...
No Matches
AXrAction.cpp
1/*
2** ETIB PROJECT, 2026
3** evan
4** File description:
5** IXrAction
6*/
7
8#include "evan/openxr/actions/AXrAction.hpp"
9
11// Public Methods //
13
15{
16 return _action;
17}
18
19const std::string &evan::AXrAction::getActionName() const
20{
21 return _actionName;
22}
23
24const std::string &evan::AXrAction::getBindingPath() const
25{
26 return _bindingPath;
27}
28
30{
31 this->getLogger().info() << "Creating action: " << properties.actionName;
32
33 _actionName = properties.actionName;
34 _bindingPath = properties.bindingPath;
35
37 actionCreateInfo.actionType = properties.actionType;
38 actionCreateInfo.countSubactionPaths = 0;
39 actionCreateInfo.subactionPaths = nullptr;
40 strcpy(actionCreateInfo.localizedActionName, properties.actionName.c_str());
41 strcpy(actionCreateInfo.actionName, properties.actionName.c_str());
42
44 xrCreateAction(properties.actionSet, &actionCreateInfo, &_action);
45 if (result != XR_SUCCESS) {
46 this->getLogger().error()
47 << "Failed to create action: " << properties.actionName
48 << " with error code: " << result;
49 return;
50 }
51 this->getLogger().info()
52 << "Successfully created action: " << properties.actionName;
53}
const std::string & getActionName() const
Retrieves the name of the action.
Definition AXrAction.cpp:19
void createAction(const PropertiesXrActions &properties)
Creates an OpenXR action based on the provided properties.
Definition AXrAction.cpp:29
XrAction getAction() const
Retrieves the XrAction handle associated with this AXrAction.
Definition AXrAction.cpp:14
const std::string & getBindingPath() const
Retrieves the binding path of the action.
Definition AXrAction.cpp:24
Encapsulates properties required for creating an OpenXR action.
Definition AXrAction.hpp:52
Small result wrapper used by helpers that must return both a status and a value (e....
Definition Error.hpp:89