class_openxrinterface.rst 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/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. .. rst-class:: classref-reftable-group
  29. Methods
  30. -------
  31. .. table::
  32. :widths: auto
  33. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>` **(** **)** |const| |
  35. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| |
  37. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>` **(** :ref:`String<class_String>` name **)** |const| |
  39. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** |
  41. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. .. rst-class:: classref-section-separator
  43. ----
  44. .. rst-class:: classref-descriptions-group
  45. Signals
  46. -------
  47. .. _class_OpenXRInterface_signal_pose_recentered:
  48. .. rst-class:: classref-signal
  49. **pose_recentered** **(** **)**
  50. Informs the user queued a recenter of the player position.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_OpenXRInterface_signal_session_begun:
  54. .. rst-class:: classref-signal
  55. **session_begun** **(** **)**
  56. Informs our OpenXR session has been started.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_OpenXRInterface_signal_session_focussed:
  60. .. rst-class:: classref-signal
  61. **session_focussed** **(** **)**
  62. Informs our OpenXR session now has focus.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_OpenXRInterface_signal_session_stopping:
  66. .. rst-class:: classref-signal
  67. **session_stopping** **(** **)**
  68. Informs our OpenXR session is stopping.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_OpenXRInterface_signal_session_visible:
  72. .. rst-class:: classref-signal
  73. **session_visible** **(** **)**
  74. Informs our OpenXR session is now visible (output is being sent to the HMD).
  75. .. rst-class:: classref-section-separator
  76. ----
  77. .. rst-class:: classref-descriptions-group
  78. Property Descriptions
  79. ---------------------
  80. .. _class_OpenXRInterface_property_display_refresh_rate:
  81. .. rst-class:: classref-property
  82. :ref:`float<class_float>` **display_refresh_rate** = ``0.0``
  83. .. rst-class:: classref-property-setget
  84. - void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)**
  85. - :ref:`float<class_float>` **get_display_refresh_rate** **(** **)**
  86. 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.
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Method Descriptions
  91. -------------------
  92. .. _class_OpenXRInterface_method_get_action_sets:
  93. .. rst-class:: classref-method
  94. :ref:`Array<class_Array>` **get_action_sets** **(** **)** |const|
  95. Returns a list of action sets registered with Godot (loaded from the action map at runtime).
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
  99. .. rst-class:: classref-method
  100. :ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const|
  101. 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.
  102. .. rst-class:: classref-item-separator
  103. ----
  104. .. _class_OpenXRInterface_method_is_action_set_active:
  105. .. rst-class:: classref-method
  106. :ref:`bool<class_bool>` **is_action_set_active** **(** :ref:`String<class_String>` name **)** |const|
  107. Returns ``true`` if the given action set is active.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_OpenXRInterface_method_set_action_set_active:
  111. .. rst-class:: classref-method
  112. void **set_action_set_active** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)**
  113. Sets the given action set as active or inactive.
  114. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  115. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  116. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  117. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  118. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  119. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`