123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.0/modules/openxr/doc_classes/OpenXRInterface.xml.
- .. _class_OpenXRInterface:
- OpenXRInterface
- ===============
- **Inherits:** :ref:`XRInterface<class_XRInterface>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Our OpenXR interface.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games.
- 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.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`Setting up XR <../tutorials/xr/setting_up_xr>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +---------------------------+----------------------------------------------------------------------------------+---------+
- | :ref:`float<class_float>` | :ref:`display_refresh_rate<class_OpenXRInterface_property_display_refresh_rate>` | ``0.0`` |
- +---------------------------+----------------------------------------------------------------------------------+---------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>` **(** **)** |const| |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>` **(** :ref:`String<class_String>` name **)** |const| |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** |
- +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Signals
- -------
- .. _class_OpenXRInterface_signal_pose_recentered:
- .. rst-class:: classref-signal
- **pose_recentered** **(** **)**
- Informs the user queued a recenter of the player position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_signal_session_begun:
- .. rst-class:: classref-signal
- **session_begun** **(** **)**
- Informs our OpenXR session has been started.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_signal_session_focussed:
- .. rst-class:: classref-signal
- **session_focussed** **(** **)**
- Informs our OpenXR session now has focus.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_signal_session_stopping:
- .. rst-class:: classref-signal
- **session_stopping** **(** **)**
- Informs our OpenXR session is stopping.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_signal_session_visible:
- .. rst-class:: classref-signal
- **session_visible** **(** **)**
- Informs our OpenXR session is now visible (output is being sent to the HMD).
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_OpenXRInterface_property_display_refresh_rate:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **display_refresh_rate** = ``0.0``
- .. rst-class:: classref-property-setget
- - void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_display_refresh_rate** **(** **)**
- 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.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_OpenXRInterface_method_get_action_sets:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **get_action_sets** **(** **)** |const|
- Returns a list of action sets registered with Godot (loaded from the action map at runtime).
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_method_get_available_display_refresh_rates:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const|
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_method_is_action_set_active:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_action_set_active** **(** :ref:`String<class_String>` name **)** |const|
- Returns ``true`` if the given action set is active.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRInterface_method_set_action_set_active:
- .. rst-class:: classref-method
- void **set_action_set_active** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)**
- Sets the given action set as active or inactive.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|