blob: 8d8cbf1a29353cf97645c9de47e7ef69ef27c843 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OpenXRInterface" inherits="XRInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Our OpenXR interface.
</brief_description>
<description>
The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games.
Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset.
</description>
<tutorials>
<link title="Setting up XR">$DOCS_URL/tutorials/xr/setting_up_xr.html</link>
</tutorials>
<methods>
<method name="get_action_sets" qualifiers="const">
<return type="Array" />
<description>
Returns a list of action sets registered with Godot (loaded from the action map at runtime).
</description>
</method>
<method name="get_available_display_refresh_rates" qualifiers="const">
<return type="Array" />
<description>
Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized.
</description>
</method>
<method name="get_hand_joint_angular_velocity" qualifiers="const">
<return type="Vector3" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
<description>
If handtracking is enabled, returns the angular velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D]!
</description>
</method>
<method name="get_hand_joint_linear_velocity" qualifiers="const">
<return type="Vector3" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
<description>
If handtracking is enabled, returns the linear velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
</description>
</method>
<method name="get_hand_joint_position" qualifiers="const">
<return type="Vector3" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
<description>
If handtracking is enabled, returns the position of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
</description>
</method>
<method name="get_hand_joint_radius" qualifiers="const">
<return type="float" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
<description>
If handtracking is enabled, returns the radius of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is without worldscale applied!
</description>
</method>
<method name="get_hand_joint_rotation" qualifiers="const">
<return type="Quaternion" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
<description>
If handtracking is enabled, returns the rotation of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR.
</description>
</method>
<method name="get_motion_range" qualifiers="const">
<return type="int" enum="OpenXRInterface.HandMotionRange" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<description>
If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand].
</description>
</method>
<method name="is_action_set_active" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if the given action set is active.
</description>
</method>
<method name="set_action_set_active">
<return type="void" />
<param index="0" name="name" type="String" />
<param index="1" name="active" type="bool" />
<description>
Sets the given action set as active or inactive.
</description>
</method>
<method name="set_motion_range">
<return type="void" />
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
<param index="1" name="motion_range" type="int" enum="OpenXRInterface.HandMotionRange" />
<description>
If handtracking is enabled and motion range is supported, sets the currently configured motion range for [param hand] to [param motion_range].
</description>
</method>
</methods>
<members>
<member name="display_refresh_rate" type="float" setter="set_display_refresh_rate" getter="get_display_refresh_rate" default="0.0">
The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized.
</member>
<member name="render_target_size_multiplier" type="float" setter="set_render_target_size_multiplier" getter="get_render_target_size_multiplier" default="1.0">
The render size multiplier for the current HMD. Must be set before the interface has been initialized.
</member>
</members>
<signals>
<signal name="pose_recentered">
<description>
Informs the user queued a recenter of the player position.
</description>
</signal>
<signal name="session_begun">
<description>
Informs our OpenXR session has been started.
</description>
</signal>
<signal name="session_focussed">
<description>
Informs our OpenXR session now has focus.
</description>
</signal>
<signal name="session_stopping">
<description>
Informs our OpenXR session is stopping.
</description>
</signal>
<signal name="session_visible">
<description>
Informs our OpenXR session is now visible (output is being sent to the HMD).
</description>
</signal>
</signals>
<constants>
<constant name="HAND_LEFT" value="0" enum="Hand">
Left hand.
</constant>
<constant name="HAND_RIGHT" value="1" enum="Hand">
Right hand.
</constant>
<constant name="HAND_MAX" value="2" enum="Hand">
Maximum value for the hand enum.
</constant>
<constant name="HAND_MOTION_RANGE_UNOBSTRUCTED" value="0" enum="HandMotionRange">
</constant>
<constant name="HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER" value="1" enum="HandMotionRange">
</constant>
<constant name="HAND_MOTION_RANGE_MAX" value="2" enum="HandMotionRange">
</constant>
<constant name="HAND_JOINT_PALM" value="0" enum="HandJoints">
Palm joint.
</constant>
<constant name="HAND_JOINT_WRIST" value="1" enum="HandJoints">
Wrist joint.
</constant>
<constant name="HAND_JOINT_THUMB_METACARPAL" value="2" enum="HandJoints">
Thumb metacarpal joint.
</constant>
<constant name="HAND_JOINT_THUMB_PROXIMAL" value="3" enum="HandJoints">
Thumb proximal joint.
</constant>
<constant name="HAND_JOINT_THUMB_DISTAL" value="4" enum="HandJoints">
Thumb distal joint.
</constant>
<constant name="HAND_JOINT_THUMB_TIP" value="5" enum="HandJoints">
Thumb tip joint.
</constant>
<constant name="HAND_JOINT_INDEX_METACARPAL" value="6" enum="HandJoints">
Index metacarpal joint.
</constant>
<constant name="HAND_JOINT_INDEX_PROXIMAL" value="7" enum="HandJoints">
Index proximal joint.
</constant>
<constant name="HAND_JOINT_INDEX_INTERMEDIATE" value="8" enum="HandJoints">
Index intermediate joint.
</constant>
<constant name="HAND_JOINT_INDEX_DISTAL" value="9" enum="HandJoints">
Index distal joint.
</constant>
<constant name="HAND_JOINT_INDEX_TIP" value="10" enum="HandJoints">
Index tip joint.
</constant>
<constant name="HAND_JOINT_MIDDLE_METACARPAL" value="11" enum="HandJoints">
Middle metacarpal joint.
</constant>
<constant name="HAND_JOINT_MIDDLE_PROXIMAL" value="12" enum="HandJoints">
Middle proximal joint.
</constant>
<constant name="HAND_JOINT_MIDDLE_INTERMEDIATE" value="13" enum="HandJoints">
Middle intermediate joint.
</constant>
<constant name="HAND_JOINT_MIDDLE_DISTAL" value="14" enum="HandJoints">
Middle distal joint.
</constant>
<constant name="HAND_JOINT_MIDDLE_TIP" value="15" enum="HandJoints">
Middle tip joint.
</constant>
<constant name="HAND_JOINT_RING_METACARPAL" value="16" enum="HandJoints">
Ring metacarpal joint.
</constant>
<constant name="HAND_JOINT_RING_PROXIMAL" value="17" enum="HandJoints">
Ring proximal joint.
</constant>
<constant name="HAND_JOINT_RING_INTERMEDIATE" value="18" enum="HandJoints">
Ring intermediate joint.
</constant>
<constant name="HAND_JOINT_RING_DISTAL" value="19" enum="HandJoints">
Ring distal joint.
</constant>
<constant name="HAND_JOINT_RING_TIP" value="20" enum="HandJoints">
Ring tip joint.
</constant>
<constant name="HAND_JOINT_LITTLE_METACARPAL" value="21" enum="HandJoints">
Little metacarpal joint.
</constant>
<constant name="HAND_JOINT_LITTLE_PROXIMAL" value="22" enum="HandJoints">
Little proximal joint.
</constant>
<constant name="HAND_JOINT_LITTLE_INTERMEDIATE" value="23" enum="HandJoints">
Little intermediate joint.
</constant>
<constant name="HAND_JOINT_LITTLE_DISTAL" value="24" enum="HandJoints">
Little distal joint.
</constant>
<constant name="HAND_JOINT_LITTLE_TIP" value="25" enum="HandJoints">
Little tip joint.
</constant>
<constant name="HAND_JOINT_MAX" value="26" enum="HandJoints">
Maximum value for the hand joint enum.
</constant>
</constants>
</class>
|