evan 2026.1.4
Evan
Loading...
Searching...
No Matches
InteractionProfile.hpp
1/*
2** ETIB PROJECT, 2026
3** evan
4** File description:
5** InteractionProfile
6*/
7
8#pragma once
9
10#include <utility/logging/loggable.hpp>
11#include <utility/logging/default_logger.hpp>
12
13#include "evan/EvanPlatform.hpp"
14#include <openxr/openxr.h>
15
16#include <string>
17#include <vector>
18#include <iostream>
19
20namespace evan
21{
28 protected utility::logging::Loggable<InteractionProfile,
29 utility::logging::DefaultLogger>
30 {
31 public:
37
45 static std::string getRuntimeName(XrInstance instance);
46
54 static std::string getSystemName(XrInstance instance,
56
65 const std::string &pathString);
66
74 static std::string pathToString(XrInstance instance, XrPath path);
75
87 static std::string
90 const std::string &userPathString);
91
101 static std::vector<XrPath>
104
114 static std::vector<std::string>
118
128 static const std::vector<std::string> &getDefaultProfileCandidates();
129
144 static std::string getPreferredInteractionProfilePath(
146 const std::vector<std::string> &candidateProfiles,
147 const std::string &fallbackProfile);
148
149 private:
161 static bool
162 isInteractionProfileSupported(XrInstance instance,
163 const std::string &profilePath);
164 };
165} // namespace evan
A utility class for managing OpenXR interaction profiles, including retrieving runtime and system inf...
static std::vector< std::string > enumerateBoundSourcePathStringsForAction(XrInstance instance, XrSession session, XrAction action)
Enumerates the bound source path strings for a given action.
InteractionProfile()
Deleted default constructor to prevent instantiation of this utility class.
static std::string pathToString(XrInstance instance, XrPath path)
Converts an OpenXR path to a string.
static std::string getSystemName(XrInstance instance, XrSystemId systemId)
Retrieves the name of the OpenXR system.
static XrPath stringToPath(XrInstance instance, const std::string &pathString)
Converts a string to an OpenXR path.
static std::string getRuntimeName(XrInstance instance)
Retrieves the name of the OpenXR runtime in use.
static std::vector< XrPath > enumerateBoundSourcesForAction(XrInstance instance, XrSession session, XrAction action)
Enumerates the bound source paths for a given action.
static std::string getCurrentInteractionProfilePath(XrInstance instance, XrSession session, const std::string &userPathString)
Retrieves the current interaction profile path for a given user path.
static std::string getPreferredInteractionProfilePath(XrInstance instance, const std::vector< std::string > &candidateProfiles, const std::string &fallbackProfile)
Selects the preferred interaction profile path.
static const std::vector< std::string > & getDefaultProfileCandidates()
Retrieves the default interaction profile candidates.
Small result wrapper used by helpers that must return both a status and a value (e....
Definition Error.hpp:89