class_openxrinterface.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. .. rst-class:: classref-reftable-group
  29. Methods
  30. -------
  31. .. table::
  32. :widths: auto
  33. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| |
  35. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  36. .. rst-class:: classref-section-separator
  37. ----
  38. .. rst-class:: classref-descriptions-group
  39. Signals
  40. -------
  41. .. _class_OpenXRInterface_signal_pose_recentered:
  42. .. rst-class:: classref-signal
  43. **pose_recentered** **(** **)**
  44. Informs the user queued a recenter of the player position.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _class_OpenXRInterface_signal_session_begun:
  48. .. rst-class:: classref-signal
  49. **session_begun** **(** **)**
  50. Informs our OpenXR session has been started.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_OpenXRInterface_signal_session_focussed:
  54. .. rst-class:: classref-signal
  55. **session_focussed** **(** **)**
  56. Informs our OpenXR session now has focus.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_OpenXRInterface_signal_session_stopping:
  60. .. rst-class:: classref-signal
  61. **session_stopping** **(** **)**
  62. Informs our OpenXR session is stopping.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_OpenXRInterface_signal_session_visible:
  66. .. rst-class:: classref-signal
  67. **session_visible** **(** **)**
  68. Informs our OpenXR session is now visible (output is being sent to the HMD).
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Property Descriptions
  73. ---------------------
  74. .. _class_OpenXRInterface_property_display_refresh_rate:
  75. .. rst-class:: classref-property
  76. :ref:`float<class_float>` **display_refresh_rate** = ``0.0``
  77. .. rst-class:: classref-property-setget
  78. - void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)**
  79. - :ref:`float<class_float>` **get_display_refresh_rate** **(** **)**
  80. 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.
  81. .. rst-class:: classref-section-separator
  82. ----
  83. .. rst-class:: classref-descriptions-group
  84. Method Descriptions
  85. -------------------
  86. .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
  87. .. rst-class:: classref-method
  88. :ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const|
  89. 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.
  90. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  91. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  92. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  93. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  94. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  95. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`