class_openxrinterface.rst 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRInterface.xml.
  6. .. _class_OpenXRInterface:
  7. OpenXRInterface
  8. ===============
  9. **Inherits:** :ref:`XRInterface<class_XRInterface>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Our OpenXR interface.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games.
  15. 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.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Setting up XR <../tutorials/xr/setting_up_xr>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`float<class_float>` | :ref:`display_refresh_rate<class_OpenXRInterface_property_display_refresh_rate>` | ``0.0`` |
  27. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`foveation_dynamic<class_OpenXRInterface_property_foveation_dynamic>` | ``false`` |
  29. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`int<class_int>` | :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>` | ``0`` |
  31. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`float<class_float>` | :ref:`render_target_size_multiplier<class_OpenXRInterface_property_render_target_size_multiplier>` | ``1.0`` |
  33. +---------------------------+----------------------------------------------------------------------------------------------------+-----------+
  34. .. rst-class:: classref-reftable-group
  35. Methods
  36. -------
  37. .. table::
  38. :widths: auto
  39. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>` **(** **)** |const| |
  41. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| |
  43. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_angular_velocity<class_OpenXRInterface_method_get_hand_joint_angular_velocity>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  45. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |bitfield|\<:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\> | :ref:`get_hand_joint_flags<class_OpenXRInterface_method_get_hand_joint_flags>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  47. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_linear_velocity<class_OpenXRInterface_method_get_hand_joint_linear_velocity>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  49. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_position<class_OpenXRInterface_method_get_hand_joint_position>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  51. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`get_hand_joint_radius<class_OpenXRInterface_method_get_hand_joint_radius>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  53. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Quaternion<class_Quaternion>` | :ref:`get_hand_joint_rotation<class_OpenXRInterface_method_get_hand_joint_rotation>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const| |
  55. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` | :ref:`get_hand_tracking_source<class_OpenXRInterface_method_get_hand_tracking_source>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const| |
  57. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` | :ref:`get_motion_range<class_OpenXRInterface_method_get_motion_range>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const| |
  59. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>` **(** :ref:`String<class_String>` name **)** |const| |
  61. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`is_eye_gaze_interaction_supported<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>` **(** **)** |
  63. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`is_foveation_supported<class_OpenXRInterface_method_is_foveation_supported>` **(** **)** |const| |
  65. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`is_hand_tracking_supported<class_OpenXRInterface_method_is_hand_tracking_supported>` **(** **)** |
  67. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** |
  69. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`set_motion_range<class_OpenXRInterface_method_set_motion_range>` **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` motion_range **)** |
  71. +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. .. rst-class:: classref-section-separator
  73. ----
  74. .. rst-class:: classref-descriptions-group
  75. Signals
  76. -------
  77. .. _class_OpenXRInterface_signal_pose_recentered:
  78. .. rst-class:: classref-signal
  79. **pose_recentered** **(** **)**
  80. Informs the user queued a recenter of the player position.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_OpenXRInterface_signal_session_begun:
  84. .. rst-class:: classref-signal
  85. **session_begun** **(** **)**
  86. Informs our OpenXR session has been started.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_OpenXRInterface_signal_session_focussed:
  90. .. rst-class:: classref-signal
  91. **session_focussed** **(** **)**
  92. Informs our OpenXR session now has focus.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_OpenXRInterface_signal_session_stopping:
  96. .. rst-class:: classref-signal
  97. **session_stopping** **(** **)**
  98. Informs our OpenXR session is stopping.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_OpenXRInterface_signal_session_visible:
  102. .. rst-class:: classref-signal
  103. **session_visible** **(** **)**
  104. Informs our OpenXR session is now visible (output is being sent to the HMD).
  105. .. rst-class:: classref-section-separator
  106. ----
  107. .. rst-class:: classref-descriptions-group
  108. Enumerations
  109. ------------
  110. .. _enum_OpenXRInterface_Hand:
  111. .. rst-class:: classref-enumeration
  112. enum **Hand**:
  113. .. _class_OpenXRInterface_constant_HAND_LEFT:
  114. .. rst-class:: classref-enumeration-constant
  115. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_LEFT** = ``0``
  116. Left hand.
  117. .. _class_OpenXRInterface_constant_HAND_RIGHT:
  118. .. rst-class:: classref-enumeration-constant
  119. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_RIGHT** = ``1``
  120. Right hand.
  121. .. _class_OpenXRInterface_constant_HAND_MAX:
  122. .. rst-class:: classref-enumeration-constant
  123. :ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_MAX** = ``2``
  124. Maximum value for the hand enum.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _enum_OpenXRInterface_HandMotionRange:
  128. .. rst-class:: classref-enumeration
  129. enum **HandMotionRange**:
  130. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_UNOBSTRUCTED:
  131. .. rst-class:: classref-enumeration-constant
  132. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_UNOBSTRUCTED** = ``0``
  133. Full hand range, if user closes their hands, we make a full fist.
  134. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER:
  135. .. rst-class:: classref-enumeration-constant
  136. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1``
  137. Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.
  138. .. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_MAX:
  139. .. rst-class:: classref-enumeration-constant
  140. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_MAX** = ``2``
  141. Maximum value for the motion range enum.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _enum_OpenXRInterface_HandTrackedSource:
  145. .. rst-class:: classref-enumeration
  146. enum **HandTrackedSource**:
  147. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNKNOWN:
  148. .. rst-class:: classref-enumeration-constant
  149. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNKNOWN** = ``0``
  150. The source of hand tracking data is unknown (the extension is likely unsupported).
  151. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNOBSTRUCTED:
  152. .. rst-class:: classref-enumeration-constant
  153. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNOBSTRUCTED** = ``1``
  154. The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc.
  155. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_CONTROLLER:
  156. .. rst-class:: classref-enumeration-constant
  157. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_CONTROLLER** = ``2``
  158. The source of hand tracking is a controller, bone positions are inferred from controller inputs.
  159. .. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_MAX:
  160. .. rst-class:: classref-enumeration-constant
  161. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_MAX** = ``3``
  162. Maximum value for the hand tracked source enum.
  163. .. rst-class:: classref-item-separator
  164. ----
  165. .. _enum_OpenXRInterface_HandJoints:
  166. .. rst-class:: classref-enumeration
  167. enum **HandJoints**:
  168. .. _class_OpenXRInterface_constant_HAND_JOINT_PALM:
  169. .. rst-class:: classref-enumeration-constant
  170. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_PALM** = ``0``
  171. Palm joint.
  172. .. _class_OpenXRInterface_constant_HAND_JOINT_WRIST:
  173. .. rst-class:: classref-enumeration-constant
  174. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_WRIST** = ``1``
  175. Wrist joint.
  176. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL:
  177. .. rst-class:: classref-enumeration-constant
  178. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_METACARPAL** = ``2``
  179. Thumb metacarpal joint.
  180. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL:
  181. .. rst-class:: classref-enumeration-constant
  182. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_PROXIMAL** = ``3``
  183. Thumb proximal joint.
  184. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL:
  185. .. rst-class:: classref-enumeration-constant
  186. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_DISTAL** = ``4``
  187. Thumb distal joint.
  188. .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP:
  189. .. rst-class:: classref-enumeration-constant
  190. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_TIP** = ``5``
  191. Thumb tip joint.
  192. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL:
  193. .. rst-class:: classref-enumeration-constant
  194. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_METACARPAL** = ``6``
  195. Index metacarpal joint.
  196. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL:
  197. .. rst-class:: classref-enumeration-constant
  198. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_PROXIMAL** = ``7``
  199. Index proximal joint.
  200. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE:
  201. .. rst-class:: classref-enumeration-constant
  202. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8``
  203. Index intermediate joint.
  204. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL:
  205. .. rst-class:: classref-enumeration-constant
  206. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_DISTAL** = ``9``
  207. Index distal joint.
  208. .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP:
  209. .. rst-class:: classref-enumeration-constant
  210. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_TIP** = ``10``
  211. Index tip joint.
  212. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL:
  213. .. rst-class:: classref-enumeration-constant
  214. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_METACARPAL** = ``11``
  215. Middle metacarpal joint.
  216. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL:
  217. .. rst-class:: classref-enumeration-constant
  218. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12``
  219. Middle proximal joint.
  220. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE:
  221. .. rst-class:: classref-enumeration-constant
  222. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13``
  223. Middle intermediate joint.
  224. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL:
  225. .. rst-class:: classref-enumeration-constant
  226. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_DISTAL** = ``14``
  227. Middle distal joint.
  228. .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP:
  229. .. rst-class:: classref-enumeration-constant
  230. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_TIP** = ``15``
  231. Middle tip joint.
  232. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL:
  233. .. rst-class:: classref-enumeration-constant
  234. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_METACARPAL** = ``16``
  235. Ring metacarpal joint.
  236. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL:
  237. .. rst-class:: classref-enumeration-constant
  238. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_PROXIMAL** = ``17``
  239. Ring proximal joint.
  240. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE:
  241. .. rst-class:: classref-enumeration-constant
  242. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_INTERMEDIATE** = ``18``
  243. Ring intermediate joint.
  244. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL:
  245. .. rst-class:: classref-enumeration-constant
  246. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_DISTAL** = ``19``
  247. Ring distal joint.
  248. .. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP:
  249. .. rst-class:: classref-enumeration-constant
  250. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_TIP** = ``20``
  251. Ring tip joint.
  252. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL:
  253. .. rst-class:: classref-enumeration-constant
  254. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_METACARPAL** = ``21``
  255. Little metacarpal joint.
  256. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL:
  257. .. rst-class:: classref-enumeration-constant
  258. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_PROXIMAL** = ``22``
  259. Little proximal joint.
  260. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE:
  261. .. rst-class:: classref-enumeration-constant
  262. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23``
  263. Little intermediate joint.
  264. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL:
  265. .. rst-class:: classref-enumeration-constant
  266. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_DISTAL** = ``24``
  267. Little distal joint.
  268. .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP:
  269. .. rst-class:: classref-enumeration-constant
  270. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_TIP** = ``25``
  271. Little tip joint.
  272. .. _class_OpenXRInterface_constant_HAND_JOINT_MAX:
  273. .. rst-class:: classref-enumeration-constant
  274. :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MAX** = ``26``
  275. Maximum value for the hand joint enum.
  276. .. rst-class:: classref-item-separator
  277. ----
  278. .. _enum_OpenXRInterface_HandJointFlags:
  279. .. rst-class:: classref-enumeration
  280. flags **HandJointFlags**:
  281. .. _class_OpenXRInterface_constant_HAND_JOINT_NONE:
  282. .. rst-class:: classref-enumeration-constant
  283. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_NONE** = ``0``
  284. No flags are set.
  285. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_VALID:
  286. .. rst-class:: classref-enumeration-constant
  287. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_VALID** = ``1``
  288. If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.
  289. .. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_TRACKED:
  290. .. rst-class:: classref-enumeration-constant
  291. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_TRACKED** = ``2``
  292. If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.
  293. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_VALID:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_VALID** = ``4``
  296. If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.
  297. .. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_TRACKED:
  298. .. rst-class:: classref-enumeration-constant
  299. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_TRACKED** = ``8``
  300. If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.
  301. .. _class_OpenXRInterface_constant_HAND_JOINT_LINEAR_VELOCITY_VALID:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_LINEAR_VELOCITY_VALID** = ``16``
  304. If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.
  305. .. _class_OpenXRInterface_constant_HAND_JOINT_ANGULAR_VELOCITY_VALID:
  306. .. rst-class:: classref-enumeration-constant
  307. :ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ANGULAR_VELOCITY_VALID** = ``32``
  308. If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.
  309. .. rst-class:: classref-section-separator
  310. ----
  311. .. rst-class:: classref-descriptions-group
  312. Property Descriptions
  313. ---------------------
  314. .. _class_OpenXRInterface_property_display_refresh_rate:
  315. .. rst-class:: classref-property
  316. :ref:`float<class_float>` **display_refresh_rate** = ``0.0``
  317. .. rst-class:: classref-property-setget
  318. - void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)**
  319. - :ref:`float<class_float>` **get_display_refresh_rate** **(** **)**
  320. 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.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _class_OpenXRInterface_property_foveation_dynamic:
  324. .. rst-class:: classref-property
  325. :ref:`bool<class_bool>` **foveation_dynamic** = ``false``
  326. .. rst-class:: classref-property-setget
  327. - void **set_foveation_dynamic** **(** :ref:`bool<class_bool>` value **)**
  328. - :ref:`bool<class_bool>` **get_foveation_dynamic** **(** **)**
  329. Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>`.
  330. \ **Note:** Only works on compatibility renderer.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_OpenXRInterface_property_foveation_level:
  334. .. rst-class:: classref-property
  335. :ref:`int<class_int>` **foveation_level** = ``0``
  336. .. rst-class:: classref-property-setget
  337. - void **set_foveation_level** **(** :ref:`int<class_int>` value **)**
  338. - :ref:`int<class_int>` **get_foveation_level** **(** **)**
  339. Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible.
  340. \ **Note:** Only works on compatibility renderer.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_OpenXRInterface_property_render_target_size_multiplier:
  344. .. rst-class:: classref-property
  345. :ref:`float<class_float>` **render_target_size_multiplier** = ``1.0``
  346. .. rst-class:: classref-property-setget
  347. - void **set_render_target_size_multiplier** **(** :ref:`float<class_float>` value **)**
  348. - :ref:`float<class_float>` **get_render_target_size_multiplier** **(** **)**
  349. The render size multiplier for the current HMD. Must be set before the interface has been initialized.
  350. .. rst-class:: classref-section-separator
  351. ----
  352. .. rst-class:: classref-descriptions-group
  353. Method Descriptions
  354. -------------------
  355. .. _class_OpenXRInterface_method_get_action_sets:
  356. .. rst-class:: classref-method
  357. :ref:`Array<class_Array>` **get_action_sets** **(** **)** |const|
  358. Returns a list of action sets registered with Godot (loaded from the action map at runtime).
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
  362. .. rst-class:: classref-method
  363. :ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const|
  364. 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.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_OpenXRInterface_method_get_hand_joint_angular_velocity:
  368. .. rst-class:: classref-method
  369. :ref:`Vector3<class_Vector3>` **get_hand_joint_angular_velocity** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  370. If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>`!
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_OpenXRInterface_method_get_hand_joint_flags:
  374. .. rst-class:: classref-method
  375. |bitfield|\<:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\> **get_hand_joint_flags** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  376. If handtracking is enabled, returns flags that inform us of the validity of the tracking data.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_OpenXRInterface_method_get_hand_joint_linear_velocity:
  380. .. rst-class:: classref-method
  381. :ref:`Vector3<class_Vector3>` **get_hand_joint_linear_velocity** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  382. If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied!
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_OpenXRInterface_method_get_hand_joint_position:
  386. .. rst-class:: classref-method
  387. :ref:`Vector3<class_Vector3>` **get_hand_joint_position** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  388. If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied!
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_OpenXRInterface_method_get_hand_joint_radius:
  392. .. rst-class:: classref-method
  393. :ref:`float<class_float>` **get_hand_joint_radius** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  394. If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied!
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_OpenXRInterface_method_get_hand_joint_rotation:
  398. .. rst-class:: classref-method
  399. :ref:`Quaternion<class_Quaternion>` **get_hand_joint_rotation** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandJoints<enum_OpenXRInterface_HandJoints>` joint **)** |const|
  400. If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_OpenXRInterface_method_get_hand_tracking_source:
  404. .. rst-class:: classref-method
  405. :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **get_hand_tracking_source** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const|
  406. If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for ``hand``.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_OpenXRInterface_method_get_motion_range:
  410. .. rst-class:: classref-method
  411. :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **get_motion_range** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand **)** |const|
  412. If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_OpenXRInterface_method_is_action_set_active:
  416. .. rst-class:: classref-method
  417. :ref:`bool<class_bool>` **is_action_set_active** **(** :ref:`String<class_String>` name **)** |const|
  418. Returns ``true`` if the given action set is active.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_OpenXRInterface_method_is_eye_gaze_interaction_supported:
  422. .. rst-class:: classref-method
  423. :ref:`bool<class_bool>` **is_eye_gaze_interaction_supported** **(** **)**
  424. Returns the capabilities of the eye gaze interaction extension.
  425. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  426. .. rst-class:: classref-item-separator
  427. ----
  428. .. _class_OpenXRInterface_method_is_foveation_supported:
  429. .. rst-class:: classref-method
  430. :ref:`bool<class_bool>` **is_foveation_supported** **(** **)** |const|
  431. Returns ``true`` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value.
  432. \ **Note:** This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to ``VRS_XR`` on desktop.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _class_OpenXRInterface_method_is_hand_tracking_supported:
  436. .. rst-class:: classref-method
  437. :ref:`bool<class_bool>` **is_hand_tracking_supported** **(** **)**
  438. Returns ``true`` if OpenXR's hand tracking is supported and enabled.
  439. \ **Note:** This only returns a valid value after OpenXR has been initialized.
  440. .. rst-class:: classref-item-separator
  441. ----
  442. .. _class_OpenXRInterface_method_set_action_set_active:
  443. .. rst-class:: classref-method
  444. void **set_action_set_active** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)**
  445. Sets the given action set as active or inactive.
  446. .. rst-class:: classref-item-separator
  447. ----
  448. .. _class_OpenXRInterface_method_set_motion_range:
  449. .. rst-class:: classref-method
  450. void **set_motion_range** **(** :ref:`Hand<enum_OpenXRInterface_Hand>` hand, :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` motion_range **)**
  451. If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``.
  452. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  453. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  454. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  455. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  456. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  457. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  458. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`