Ocean
openxr/OpenXR.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_PLATFORM_OPENXR_OPEN_XR_H
9 #define META_OCEAN_PLATFORM_OPENXR_OPEN_XR_H
10 
12 
14 
15 #include <openxr/openxr.h>
16 
17 namespace Ocean
18 {
19 
20 namespace Platform
21 {
22 
23 namespace OpenXR
24 {
25 
26 /**
27  * @ingroup platform
28  * @defgroup platformopenxr Ocean Platform OpenXR Library
29  * @{
30  * The Ocean OpenXR Library provides specific functionalities for OpenXR.
31  * The library is available on platforms supporting OpenXR.
32  * @}
33  */
34 
35 /**
36  * @namespace Ocean::Platform::OpenXR Namespace of the Platform OpenXR library.<p>
37  * The Namespace Ocean::Platform::OpenXR is used in the entire Ocean Platform OpenXR Library.
38  */
39 
40 // Defines OCEAN_PLATFORM_OPENXR_EXPORT for dll export and import.
41 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
42  #ifdef USE_OCEAN_PLATFORM_OPENXR_EXPORT
43  #define OCEAN_PLATFORM_OPENXR_EXPORT __declspec(dllexport)
44  #else
45  #define OCEAN_PLATFORM_OPENXR_EXPORT __declspec(dllimport)
46  #endif
47 #else
48  #define OCEAN_PLATFORM_OPENXR_EXPORT
49 #endif
50 
51 /**
52  * Wrapper function for xrDestroySpace.
53  * @param xrSpace The object to destroy
54  * @return The return value
55  * @ingroup platformopenxr
56  */
57 XrResult xrDestroySpaceOcean(XrSpace xrSpace);
58 
59 /**
60  * Definition of a scoped object holding a XrSpace object.
61  * The wrapped XrSpace object will be released automatically once the scoped object does not exist anymore.
62  * @ingroup platformopenxr
63  */
65 
66 /**
67  * Definition of a vector holding OpenXR XrVector2f objects.
68  * @see XrVector2f.
69  * @ingroup platformopenxr
70  */
71 using XrVectors2f = std::vector<XrVector2f>;
72 
73 /**
74  * Definition of a vector holding OpenXR XrVector3f objects.
75  * @see XrVector3f.
76  * @ingroup platformopenxr
77  */
78 using XrVectors3f = std::vector<XrVector3f>;
79 
80 /**
81  * Definition of a vector holding OpenXR XrVector4f objects.
82  * @see XrVector4f.
83  * @ingroup platformopenxr
84  */
85 using XrVectors4f = std::vector<XrVector4f>;
86 
87 /**
88  * Definition of a vector holding OpenXR XrVector4sFB objects.
89  * @see XrVector4sFB.
90  * @ingroup platformopenxr
91  */
92 using XrVectors4sFB = std::vector<XrVector4sFB>;
93 
94 /**
95  * Definition of a vector holding OpenXR XrPosef objects.
96  * @see XrPosef.
97  * @ingroup platformopenxr
98  */
99 using XrPosesf = std::vector<XrPosef>;
100 
101 /**
102  * Definition of a vector holding OpenXR XrHandJointEXT objects.
103  * @see XrHandJointEXT.
104  * @ingroup platformopenxr
105  */
106 using XrHandJointsEXT = std::vector<XrHandJointEXT>;
107 
108 /**
109  * Definition of a vector holding OpenXR XrPath objects.
110  * @see XrPath.
111  * @ingroup platformopenxr
112  */
113 using XrPaths = std::vector<XrPath>;
114 
115 }
116 
117 }
118 
119 }
120 
121 #endif // META_OCEAN_PLATFORM_OPENXR_OPEN_XR_H
std::vector< XrVector4sFB > XrVectors4sFB
Definition of a vector holding OpenXR XrVector4sFB objects.
Definition: openxr/OpenXR.h:92
XrResult xrDestroySpaceOcean(XrSpace xrSpace)
Wrapper function for xrDestroySpace.
std::vector< XrPosef > XrPosesf
Definition of a vector holding OpenXR XrPosef objects.
Definition: openxr/OpenXR.h:99
std::vector< XrVector3f > XrVectors3f
Definition of a vector holding OpenXR XrVector3f objects.
Definition: openxr/OpenXR.h:78
std::vector< XrVector4f > XrVectors4f
Definition of a vector holding OpenXR XrVector4f objects.
Definition: openxr/OpenXR.h:85
std::vector< XrVector2f > XrVectors2f
Definition of a vector holding OpenXR XrVector2f objects.
Definition: openxr/OpenXR.h:71
std::vector< XrPath > XrPaths
Definition of a vector holding OpenXR XrPath objects.
Definition: openxr/OpenXR.h:113
std::vector< XrHandJointEXT > XrHandJointsEXT
Definition of a vector holding OpenXR XrHandJointEXT objects.
Definition: openxr/OpenXR.h:106
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15