class_openxrinterface.rst 8.2 KB

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