A utility class for managing OpenXR interaction profiles, including retrieving runtime and system information, converting between strings and paths, and enumerating bound sources for actions.
More...
#include <headers/evan/openxr/InteractionProfile.hpp>
|
| | InteractionProfile () |
| | Deleted default constructor to prevent instantiation of this utility class.
|
| |
|
| static std::string | getRuntimeName (XrInstance instance) |
| | Retrieves the name of the OpenXR runtime in use.
|
| |
| 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 | pathToString (XrInstance instance, XrPath path) |
| | Converts an OpenXR path to a string.
|
| |
| 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::vector< XrPath > | enumerateBoundSourcesForAction (XrInstance instance, XrSession session, XrAction action) |
| | Enumerates the bound source paths for a given action.
|
| |
| static std::vector< std::string > | enumerateBoundSourcePathStringsForAction (XrInstance instance, XrSession session, XrAction action) |
| | Enumerates the bound source path strings for a given action.
|
| |
| static const std::vector< std::string > & | getDefaultProfileCandidates () |
| | Retrieves the default interaction profile candidates.
|
| |
| static std::string | getPreferredInteractionProfilePath (XrInstance instance, const std::vector< std::string > &candidateProfiles, const std::string &fallbackProfile) |
| | Selects the preferred interaction profile path.
|
| |
A utility class for managing OpenXR interaction profiles, including retrieving runtime and system information, converting between strings and paths, and enumerating bound sources for actions.
Definition at line 27 of file InteractionProfile.hpp.
◆ InteractionProfile()
| evan::InteractionProfile::InteractionProfile |
( |
| ) |
|
Deleted default constructor to prevent instantiation of this utility class.
Definition at line 14 of file InteractionProfile.cpp.
◆ enumerateBoundSourcePathStringsForAction()
| std::vector< std::string > evan::InteractionProfile::enumerateBoundSourcePathStringsForAction |
( |
XrInstance |
instance, |
|
|
XrSession |
session, |
|
|
XrAction |
action |
|
) |
| |
|
static |
Enumerates the bound source path strings for a given action.
- Parameters
-
| instance | The OpenXR instance handle. |
| session | The OpenXR session handle. |
| action | The OpenXR action handle. |
- Returns
- A vector of strings representing the bound source paths for the action.
Definition at line 139 of file InteractionProfile.cpp.
◆ enumerateBoundSourcesForAction()
Enumerates the bound source paths for a given action.
- Parameters
-
| instance | The OpenXR instance handle. |
| session | The OpenXR session handle. |
| action | The OpenXR action handle. |
- Returns
- A vector of OpenXR paths representing the bound sources for the action.
Definition at line 107 of file InteractionProfile.cpp.
◆ getCurrentInteractionProfilePath()
| std::string evan::InteractionProfile::getCurrentInteractionProfilePath |
( |
XrInstance |
instance, |
|
|
XrSession |
session, |
|
|
const std::string & |
userPathString |
|
) |
| |
|
static |
Retrieves the current interaction profile path for a given user path.
- Parameters
-
| instance | The OpenXR instance handle. |
| session | The OpenXR session handle. |
| userPathString | The string representation of the user path (e.g., "/user/hand/left"). |
- Returns
- The string representation of the current interaction profile path, or an empty string on failure.
Definition at line 83 of file InteractionProfile.cpp.
◆ getDefaultProfileCandidates()
| const std::vector< std::string > & evan::InteractionProfile::getDefaultProfileCandidates |
( |
| ) |
|
|
static |
Retrieves the default interaction profile candidates.
Profiles are listed in preference order. The first candidate reported as supported by the active runtime should be used to suggest action bindings.
- Returns
- A const reference to the default candidate profile list.
Definition at line 154 of file InteractionProfile.cpp.
◆ getPreferredInteractionProfilePath()
| std::string evan::InteractionProfile::getPreferredInteractionProfilePath |
( |
XrInstance |
instance, |
|
|
const std::vector< std::string > & |
candidateProfiles, |
|
|
const std::string & |
fallbackProfile |
|
) |
| |
|
static |
Selects the preferred interaction profile path.
Returns the first candidate profile supported by the runtime. If no candidate is supported (or the instance is null), the fallback profile is returned.
- Parameters
-
| instance | The OpenXR instance handle. |
| candidateProfiles | The candidate profile paths to try, in preference order. |
| fallbackProfile | The profile path to return when no candidate is supported. |
- Returns
- The preferred interaction profile path.
Definition at line 166 of file InteractionProfile.cpp.
◆ getRuntimeName()
| std::string evan::InteractionProfile::getRuntimeName |
( |
XrInstance |
instance | ) |
|
|
static |
Retrieves the name of the OpenXR runtime in use.
- Parameters
-
| instance | The OpenXR instance handle. |
- Returns
- The name of the OpenXR runtime, or an empty string on failure.
Definition at line 20 of file InteractionProfile.cpp.
◆ getSystemName()
Retrieves the name of the OpenXR system.
- Parameters
-
| instance | The OpenXR instance handle. |
| systemId | The OpenXR system ID. |
- Returns
- The name of the OpenXR system, or an empty string on failure.
Definition at line 31 of file InteractionProfile.cpp.
◆ pathToString()
| std::string evan::InteractionProfile::pathToString |
( |
XrInstance |
instance, |
|
|
XrPath |
path |
|
) |
| |
|
static |
Converts an OpenXR path to a string.
- Parameters
-
| instance | The OpenXR instance handle. |
| path | The OpenXR path to convert. |
- Returns
- The string representation of the OpenXR path, or an empty string on failure.
Definition at line 56 of file InteractionProfile.cpp.
◆ stringToPath()
Converts a string to an OpenXR path.
- Parameters
-
| instance | The OpenXR instance handle. |
| pathString | The string representation of the path. |
- Returns
- The corresponding OpenXR path, or XR_NULL_PATH on failure.
Definition at line 44 of file InteractionProfile.cpp.
The documentation for this class was generated from the following files: