class_openxrinterface.rst 38 KB

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