feat: godot-engine-source-4.3-stable
This commit is contained in:
parent
c59a7dcade
commit
7125d019b5
11149 changed files with 5070401 additions and 0 deletions
165
engine/modules/openxr/doc_classes/OpenXRAPIExtension.xml
Normal file
165
engine/modules/openxr/doc_classes/OpenXRAPIExtension.xml
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRAPIExtension" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Makes the OpenXR API available for GDExtension.
|
||||
</brief_description>
|
||||
<description>
|
||||
[OpenXRAPIExtension] makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the [method get_instance_proc_addr] method, and the OpenXR instance through [method get_instance].
|
||||
It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="XrResult documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html</link>
|
||||
<link title="XrInstance documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html</link>
|
||||
<link title="XrSpace documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html</link>
|
||||
<link title="XrSession documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html</link>
|
||||
<link title="XrSystemId documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html</link>
|
||||
<link title="xrBeginSession documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html</link>
|
||||
<link title="XrPosef documentation">https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="can_render">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR is initialized for rendering with an XR viewport.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_error_string">
|
||||
<return type="String" />
|
||||
<param index="0" name="result" type="int" />
|
||||
<description>
|
||||
Returns an error string for the given [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_tracker">
|
||||
<return type="int" />
|
||||
<param index="0" name="hand_index" type="int" />
|
||||
<description>
|
||||
Returns the corresponding [code]XRHandTrackerEXT[/code] handle for the given hand index value.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_instance">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html]XrInstance[/url] created during the initialization of the OpenXR API.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_instance_proc_addr">
|
||||
<return type="int" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns [code]0[/code].
|
||||
[b]Note:[/b] [code]openxr/util.h[/code] contains utility macros for acquiring OpenXR functions, e.g. [code]GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_next_frame_time">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the predicted display timing for the next frame.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_play_space">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the play space, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html]XrSpace[/url] cast to an integer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_predicted_display_time">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the predicted display timing for the current frame.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_session">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the OpenXR session, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html]XrSession[/url] cast to an integer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_swapchain_format_name">
|
||||
<return type="String" />
|
||||
<param index="0" name="swapchain_format" type="int" />
|
||||
<description>
|
||||
Returns the name of the specified swapchain format.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_system_id">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the id of the system, which is a [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html]XrSystemId[/url] cast to an integer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_environment_blend_mode_alpha_supported">
|
||||
<return type="int" enum="OpenXRAPIExtension.OpenXRAlphaBlendModeSupport" />
|
||||
<description>
|
||||
Returns [enum OpenXRAPIExtension.OpenXRAlphaBlendModeSupport] denoting if [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported, emulated or not supported at all.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_initialized">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR is initialized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_running">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR is running ([url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html]xrBeginSession[/url] was successfully called and the swapchains were created).
|
||||
</description>
|
||||
</method>
|
||||
<method name="openxr_is_enabled" qualifiers="static">
|
||||
<return type="bool" />
|
||||
<param index="0" name="check_run_in_editor" type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_composition_layer_provider">
|
||||
<return type="void" />
|
||||
<param index="0" name="extension" type="OpenXRExtensionWrapperExtension" />
|
||||
<description>
|
||||
Registers the given extension as a composition layer provider.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_emulate_environment_blend_mode_alpha_blend">
|
||||
<return type="void" />
|
||||
<param index="0" name="enabled" type="bool" />
|
||||
<description>
|
||||
If set to [code]true[/code], an OpenXR extension is loaded which is capable of emulating the [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] blend mode.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transform_from_pose">
|
||||
<return type="Transform3D" />
|
||||
<param index="0" name="pose" type="const void*" />
|
||||
<description>
|
||||
Creates a [Transform3D] from an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html]XrPosef[/url].
|
||||
</description>
|
||||
</method>
|
||||
<method name="unregister_composition_layer_provider">
|
||||
<return type="void" />
|
||||
<param index="0" name="extension" type="OpenXRExtensionWrapperExtension" />
|
||||
<description>
|
||||
Unregisters the given extension as a composition layer provider.
|
||||
</description>
|
||||
</method>
|
||||
<method name="xr_result">
|
||||
<return type="bool" />
|
||||
<param index="0" name="result" type="int" />
|
||||
<param index="1" name="format" type="String" />
|
||||
<param index="2" name="args" type="Array" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] (cast to an integer) is successful. Otherwise returns [code]false[/code] and prints the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] converted to a string, with the specified additional information.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
<constant name="OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE" value="0" enum="OpenXRAlphaBlendModeSupport">
|
||||
Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] isn't supported at all.
|
||||
</constant>
|
||||
<constant name="OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL" value="1" enum="OpenXRAlphaBlendModeSupport">
|
||||
Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported.
|
||||
</constant>
|
||||
<constant name="OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING" value="2" enum="OpenXRAlphaBlendModeSupport">
|
||||
Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is emulated.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
38
engine/modules/openxr/doc_classes/OpenXRAction.xml
Normal file
38
engine/modules/openxr/doc_classes/OpenXRAction.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRAction" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
An OpenXR action.
|
||||
</brief_description>
|
||||
<description>
|
||||
This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, etc.) and outputs (haptics).
|
||||
OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return [code]false[/code] if the trigger is depressed and [code]true[/code] if pressed fully.
|
||||
Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved]reserved path section in the OpenXR specification[/url] for more info on the top level paths.
|
||||
Note that the name of the resource is used to register the action with.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="action_type" type="int" setter="set_action_type" getter="get_action_type" enum="OpenXRAction.ActionType" default="1">
|
||||
The type of action.
|
||||
</member>
|
||||
<member name="localized_name" type="String" setter="set_localized_name" getter="get_localized_name" default="""">
|
||||
The localized description of this action.
|
||||
</member>
|
||||
<member name="toplevel_paths" type="PackedStringArray" setter="set_toplevel_paths" getter="get_toplevel_paths" default="PackedStringArray()">
|
||||
A collections of toplevel paths to which this action can be bound.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="OPENXR_ACTION_BOOL" value="0" enum="ActionType">
|
||||
This action provides a boolean value.
|
||||
</constant>
|
||||
<constant name="OPENXR_ACTION_FLOAT" value="1" enum="ActionType">
|
||||
This action provides a float value between [code]0.0[/code] and [code]1.0[/code] for any analog input such as triggers.
|
||||
</constant>
|
||||
<constant name="OPENXR_ACTION_VECTOR2" value="2" enum="ActionType">
|
||||
This action provides a [Vector2] value and can be bound to embedded trackpads and joysticks.
|
||||
</constant>
|
||||
<constant name="OPENXR_ACTION_POSE" value="3" enum="ActionType">
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
97
engine/modules/openxr/doc_classes/OpenXRActionMap.xml
Normal file
97
engine/modules/openxr/doc_classes/OpenXRActionMap.xml
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRActionMap" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Collection of [OpenXRActionSet] and [OpenXRInteractionProfile] resources for the OpenXR module.
|
||||
</brief_description>
|
||||
<description>
|
||||
OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports.
|
||||
Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available.
|
||||
The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_action_set">
|
||||
<return type="void" />
|
||||
<param index="0" name="action_set" type="OpenXRActionSet" />
|
||||
<description>
|
||||
Add an action set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_interaction_profile">
|
||||
<return type="void" />
|
||||
<param index="0" name="interaction_profile" type="OpenXRInteractionProfile" />
|
||||
<description>
|
||||
Add an interaction profile.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_default_action_sets">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Setup this action set with our default actions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_action_set" qualifiers="const">
|
||||
<return type="OpenXRActionSet" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
Retrieve an action set by name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_interaction_profile" qualifiers="const">
|
||||
<return type="OpenXRInteractionProfile" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
Find an interaction profile by its name (path).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_action_set" qualifiers="const">
|
||||
<return type="OpenXRActionSet" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Retrieve the action set at this index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_action_set_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Retrieve the number of actions sets in our action map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interaction_profile" qualifiers="const">
|
||||
<return type="OpenXRInteractionProfile" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Get the interaction profile at this index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interaction_profile_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Retrieve the number of interaction profiles in our action map.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_action_set">
|
||||
<return type="void" />
|
||||
<param index="0" name="action_set" type="OpenXRActionSet" />
|
||||
<description>
|
||||
Remove an action set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_interaction_profile">
|
||||
<return type="void" />
|
||||
<param index="0" name="interaction_profile" type="OpenXRInteractionProfile" />
|
||||
<description>
|
||||
Remove an interaction profile.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="action_sets" type="Array" setter="set_action_sets" getter="get_action_sets" default="[]">
|
||||
Collection of [OpenXRActionSet]s that are part of this action map.
|
||||
</member>
|
||||
<member name="interaction_profiles" type="Array" setter="set_interaction_profiles" getter="get_interaction_profiles" default="[]">
|
||||
Collection of [OpenXRInteractionProfile]s that are part of this action map.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
45
engine/modules/openxr/doc_classes/OpenXRActionSet.xml
Normal file
45
engine/modules/openxr/doc_classes/OpenXRActionSet.xml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRActionSet" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Collection of [OpenXRAction] resources that make up an action set.
|
||||
</brief_description>
|
||||
<description>
|
||||
Action sets in OpenXR define a collection of actions that can be activated in unison. This allows games to easily change between different states that require different inputs or need to reinterpret inputs. For instance we could have an action set that is active when a menu is open, an action set that is active when the player is freely walking around and an action set that is active when the player is controlling a vehicle.
|
||||
Action sets can contain the same action with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_action">
|
||||
<return type="void" />
|
||||
<param index="0" name="action" type="OpenXRAction" />
|
||||
<description>
|
||||
Add an action to this action set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_action_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Retrieve the number of actions in our action set.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_action">
|
||||
<return type="void" />
|
||||
<param index="0" name="action" type="OpenXRAction" />
|
||||
<description>
|
||||
Remove an action from this action set.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="actions" type="Array" setter="set_actions" getter="get_actions" default="[]">
|
||||
Collection of actions for this action set.
|
||||
</member>
|
||||
<member name="localized_name" type="String" setter="set_localized_name" getter="get_localized_name" default="""">
|
||||
The localized name of this action set.
|
||||
</member>
|
||||
<member name="priority" type="int" setter="set_priority" getter="get_priority" default="0">
|
||||
The priority for this action set.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
47
engine/modules/openxr/doc_classes/OpenXRCompositionLayer.xml
Normal file
47
engine/modules/openxr/doc_classes/OpenXRCompositionLayer.xml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRCompositionLayer" inherits="Node3D" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
The parent class of all OpenXR composition layer nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution.
|
||||
[b]Note:[/b] If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a [ViewportTexture], in order to emulate the composition layer.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="intersects_ray" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<param index="0" name="origin" type="Vector3" />
|
||||
<param index="1" name="direction" type="Vector3" />
|
||||
<description>
|
||||
Returns UV coordinates where the given ray intersects with the composition layer. [param origin] and [param direction] must be in global space.
|
||||
Returns [code]Vector2(-1.0, -1.0)[/code] if the ray doesn't intersect.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_natively_supported" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns true if the OpenXR runtime natively supports this composition layer type.
|
||||
[b]Note:[/b] This will only return an accurate result after the OpenXR session has started.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="alpha_blend" type="bool" setter="set_alpha_blend" getter="get_alpha_blend" default="false">
|
||||
Enables the blending the layer using its alpha channel.
|
||||
Can be combined with [member Viewport.transparent_bg] to give the layer a transparent background.
|
||||
</member>
|
||||
<member name="enable_hole_punch" type="bool" setter="set_enable_hole_punch" getter="get_enable_hole_punch" default="false">
|
||||
Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting [member sort_order] to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible.
|
||||
This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer.
|
||||
</member>
|
||||
<member name="layer_viewport" type="SubViewport" setter="set_layer_viewport" getter="get_layer_viewport">
|
||||
The [SubViewport] to render on the composition layer.
|
||||
</member>
|
||||
<member name="sort_order" type="int" setter="set_sort_order" getter="get_sort_order" default="1">
|
||||
The sort order for this composition layer. Higher numbers will be shown in front of lower numbers.
|
||||
[b]Note:[/b] This will have no effect if a fallback mesh is being used.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRCompositionLayerCylinder" inherits="OpenXRCompositionLayer" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
An OpenXR composition layer that is rendered as an internal slice of a cylinder.
|
||||
</brief_description>
|
||||
<description>
|
||||
An OpenXR composition layer that allows rendering a [SubViewport] on an internal slice of a cylinder.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="aspect_ratio" type="float" setter="set_aspect_ratio" getter="get_aspect_ratio" default="1.0">
|
||||
The aspect ratio of the slice. Used to set the height relative to the width.
|
||||
</member>
|
||||
<member name="central_angle" type="float" setter="set_central_angle" getter="get_central_angle" default="1.5708">
|
||||
The central angle of the cylinder. Used to set the width.
|
||||
</member>
|
||||
<member name="fallback_segments" type="int" setter="set_fallback_segments" getter="get_fallback_segments" default="10">
|
||||
The number of segments to use in the fallback mesh.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
|
||||
The radius of the cylinder.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRCompositionLayerEquirect" inherits="OpenXRCompositionLayer" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
An OpenXR composition layer that is rendered as an internal slice of a sphere.
|
||||
</brief_description>
|
||||
<description>
|
||||
An OpenXR composition layer that allows rendering a [SubViewport] on an internal slice of a sphere.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="central_horizontal_angle" type="float" setter="set_central_horizontal_angle" getter="get_central_horizontal_angle" default="1.5708">
|
||||
The central horizontal angle of the sphere. Used to set the width.
|
||||
</member>
|
||||
<member name="fallback_segments" type="int" setter="set_fallback_segments" getter="get_fallback_segments" default="10">
|
||||
The number of segments to use in the fallback mesh.
|
||||
</member>
|
||||
<member name="lower_vertical_angle" type="float" setter="set_lower_vertical_angle" getter="get_lower_vertical_angle" default="0.785398">
|
||||
The lower vertical angle of the sphere. Used (together with [member upper_vertical_angle]) to set the height.
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
|
||||
The radius of the sphere.
|
||||
</member>
|
||||
<member name="upper_vertical_angle" type="float" setter="set_upper_vertical_angle" getter="get_upper_vertical_angle" default="0.785398">
|
||||
The upper vertical angle of the sphere. Used (together with [member lower_vertical_angle]) to set the height.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRCompositionLayerQuad" inherits="OpenXRCompositionLayer" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
An OpenXR composition layer that is rendered as a quad.
|
||||
</brief_description>
|
||||
<description>
|
||||
An OpenXR composition layer that allows rendering a [SubViewport] on a quad.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="quad_size" type="Vector2" setter="set_quad_size" getter="get_quad_size" default="Vector2(1, 1)">
|
||||
The dimensions of the quad.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRExtensionWrapperExtension" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Allows clients to implement OpenXR extensions with GDExtension.
|
||||
</brief_description>
|
||||
<description>
|
||||
[OpenXRExtensionWrapperExtension] allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with [method register_extension_wrapper].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_get_composition_layer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct to provide the given composition layer.
|
||||
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_composition_layer_count" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of composition layers this extension wrapper provides via [method _get_composition_layer].
|
||||
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_composition_layer_order" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns an integer that will be used to sort the given composition layer provided via [method _get_composition_layer]. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of [code]0[/code], so layers provided by this method should probably be above or below (but not exactly) [code]0[/code].
|
||||
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_requested_extensions" qualifiers="virtual">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
Returns a [Dictionary] of OpenXR extensions related to this extension. The [Dictionary] should contain the name of the extension, mapped to a [code]bool *[/code] cast to an integer:
|
||||
- If the [code]bool *[/code] is a [code]nullptr[/code] this extension is mandatory.
|
||||
- If the [code]bool *[/code] points to a boolean, the boolean will be updated to [code]true[/code] if the extension is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_suggested_tracker_names" qualifiers="virtual">
|
||||
<return type="PackedStringArray" />
|
||||
<description>
|
||||
Returns a [PackedStringArray] of positional tracker names that are used within the extension wrapper.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_viewport_composition_layer_extension_properties" qualifiers="virtual">
|
||||
<return type="Dictionary[]" />
|
||||
<description>
|
||||
Gets an array of [Dictionary]s that represent properties, just like [method Object._get_property_list], that will be added to [OpenXRCompositionLayer] nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_viewport_composition_layer_extension_property_defaults" qualifiers="virtual">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
Gets a [Dictionary] containing the default values for the properties returned by [method _get_viewport_composition_layer_extension_properties].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_before_instance_created" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called before the OpenXR instance is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_event_polled" qualifiers="virtual">
|
||||
<return type="bool" />
|
||||
<param index="0" name="event" type="const void*" />
|
||||
<description>
|
||||
Called when there is an OpenXR event to process. When implementing, return [code]true[/code] if the event was handled, return [code]false[/code] otherwise.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_instance_created" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="instance" type="int" />
|
||||
<description>
|
||||
Called right after the OpenXR instance is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_instance_destroyed" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called right before the OpenXR instance is destroyed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_main_swapchains_created" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called right after the main swapchains are (re)created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_pre_render" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called right before the XR viewports begin their rendering step.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_process" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_register_metadata" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor.
|
||||
Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_session_created" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="session" type="int" />
|
||||
<description>
|
||||
Called right after the OpenXR session is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_session_destroyed" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called right before the OpenXR session is destroyed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_exiting" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to exiting.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_focused" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to focused. This state is the active state when the game runs.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_idle" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to idle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_loss_pending" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to loss pending.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_ready" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_stopping" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to stopping.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_synchronized" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_state_visible" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_on_viewport_composition_layer_destroyed" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="layer" type="const void*" />
|
||||
<description>
|
||||
Called when a composition layer created via [OpenXRCompositionLayer] is destroyed.
|
||||
[param layer] is a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_hand_joint_locations_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="hand_index" type="int" />
|
||||
<param index="1" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures when each hand tracker is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_instance_create_info_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures when the OpenXR instance is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_session_create_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures when the OpenXR session is created.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_swapchain_create_info_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures when creating OpenXR swapchains.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_system_properties_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures when interogating OpenXR system abilities.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set_viewport_composition_layer_and_get_next_pointer" qualifiers="virtual">
|
||||
<return type="int" />
|
||||
<param index="0" name="layer" type="const void*" />
|
||||
<param index="1" name="property_values" type="Dictionary" />
|
||||
<param index="2" name="next_pointer" type="void*" />
|
||||
<description>
|
||||
Adds additional data structures to composition layers created by [OpenXRCompositionLayer].
|
||||
[param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties].
|
||||
[param layer] is a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_openxr_api">
|
||||
<return type="OpenXRAPIExtension" />
|
||||
<description>
|
||||
Returns the created [OpenXRAPIExtension], which can be used to access the OpenXR API.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_extension_wrapper">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Registers the extension. This should happen at core module initialization level.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
</class>
|
||||
69
engine/modules/openxr/doc_classes/OpenXRHand.xml
Normal file
69
engine/modules/openxr/doc_classes/OpenXRHand.xml
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRHand" inherits="Node3D" deprecated="Use [XRHandModifier3D] instead." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Node supporting hand and finger tracking in OpenXR.
|
||||
</brief_description>
|
||||
<description>
|
||||
This node enables OpenXR's hand tracking functionality. The node should be a child node of an [XROrigin3D] node, tracking will update its position to the player's tracked hand Palm joint location (the center of the middle finger's metacarpal bone). This node also updates the skeleton of a properly skinned hand or avatar model.
|
||||
If the skeleton is a hand (one of the hand bones is the root node of the skeleton), then the skeleton will be placed relative to the hand palm location and the hand mesh and skeleton should be children of the OpenXRHand node.
|
||||
If the hand bones are part of a full skeleton, then the root of the hand will keep its location with the assumption that IK is used to position the hand and arm.
|
||||
By default the skeleton hand bones are repositioned to match the size of the tracked hand. To preserve the modeled bone sizes change [member bone_update] to apply rotation only.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="bone_update" type="int" setter="set_bone_update" getter="get_bone_update" enum="OpenXRHand.BoneUpdate" default="0">
|
||||
Specify the type of updates to perform on the bone.
|
||||
</member>
|
||||
<member name="hand" type="int" setter="set_hand" getter="get_hand" enum="OpenXRHand.Hands" default="0">
|
||||
Specifies whether this node tracks the left or right hand of the player.
|
||||
</member>
|
||||
<member name="hand_skeleton" type="NodePath" setter="set_hand_skeleton" getter="get_hand_skeleton" default="NodePath("")">
|
||||
Set a [Skeleton3D] node for which the pose positions will be updated.
|
||||
</member>
|
||||
<member name="motion_range" type="int" setter="set_motion_range" getter="get_motion_range" enum="OpenXRHand.MotionRange" default="0">
|
||||
Set the motion range (if supported) limiting the hand motion.
|
||||
</member>
|
||||
<member name="skeleton_rig" type="int" setter="set_skeleton_rig" getter="get_skeleton_rig" enum="OpenXRHand.SkeletonRig" default="0">
|
||||
Set the type of skeleton rig the [member hand_skeleton] is compliant with.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="HAND_LEFT" value="0" enum="Hands">
|
||||
Tracking the player's left hand.
|
||||
</constant>
|
||||
<constant name="HAND_RIGHT" value="1" enum="Hands">
|
||||
Tracking the player's right hand.
|
||||
</constant>
|
||||
<constant name="HAND_MAX" value="2" enum="Hands">
|
||||
Maximum supported hands.
|
||||
</constant>
|
||||
<constant name="MOTION_RANGE_UNOBSTRUCTED" value="0" enum="MotionRange">
|
||||
When player grips, hand skeleton will form a full fist.
|
||||
</constant>
|
||||
<constant name="MOTION_RANGE_CONFORM_TO_CONTROLLER" value="1" enum="MotionRange">
|
||||
When player grips, hand skeleton conforms to the controller the player is holding.
|
||||
</constant>
|
||||
<constant name="MOTION_RANGE_MAX" value="2" enum="MotionRange">
|
||||
Maximum supported motion ranges.
|
||||
</constant>
|
||||
<constant name="SKELETON_RIG_OPENXR" value="0" enum="SkeletonRig">
|
||||
An OpenXR compliant skeleton.
|
||||
</constant>
|
||||
<constant name="SKELETON_RIG_HUMANOID" value="1" enum="SkeletonRig">
|
||||
A [SkeletonProfileHumanoid] compliant skeleton.
|
||||
</constant>
|
||||
<constant name="SKELETON_RIG_MAX" value="2" enum="SkeletonRig">
|
||||
Maximum supported hands.
|
||||
</constant>
|
||||
<constant name="BONE_UPDATE_FULL" value="0" enum="BoneUpdate">
|
||||
The skeletons bones are fully updated (both position and rotation) to match the tracked bones.
|
||||
</constant>
|
||||
<constant name="BONE_UPDATE_ROTATION_ONLY" value="1" enum="BoneUpdate">
|
||||
The skeletons bones are only rotated to align with the tracked bones, preserving bone length.
|
||||
</constant>
|
||||
<constant name="BONE_UPDATE_MAX" value="2" enum="BoneUpdate">
|
||||
Maximum supported bone update mode.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
48
engine/modules/openxr/doc_classes/OpenXRIPBinding.xml
Normal file
48
engine/modules/openxr/doc_classes/OpenXRIPBinding.xml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRIPBinding" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Defines a binding between an [OpenXRAction] and an XR input or output.
|
||||
</brief_description>
|
||||
<description>
|
||||
This binding resource binds an [OpenXRAction] to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger".
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_path">
|
||||
<return type="void" />
|
||||
<param index="0" name="path" type="String" />
|
||||
<description>
|
||||
Add an input/output path to this binding.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_path_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Get the number of input/output paths in this binding.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_path" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="path" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this input/output path is part of this binding.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_path">
|
||||
<return type="void" />
|
||||
<param index="0" name="path" type="String" />
|
||||
<description>
|
||||
Removes this input/output path from this binding.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="action" type="OpenXRAction" setter="set_action" getter="get_action">
|
||||
[OpenXRAction] that is bound to these paths.
|
||||
</member>
|
||||
<member name="paths" type="PackedStringArray" setter="set_paths" getter="get_paths" default="PackedStringArray()">
|
||||
Paths that define the inputs or outputs bound on the device.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRInteractionProfile" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Suggested bindings object for OpenXR.
|
||||
</brief_description>
|
||||
<description>
|
||||
This object stores suggested bindings for an interaction profile. Interaction profiles define the metadata for a tracked XR device such as an XR controller.
|
||||
For more information see the [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-interaction-profiles]interaction profiles info in the OpenXR specification[/url].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_binding" qualifiers="const">
|
||||
<return type="OpenXRIPBinding" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Retrieve the binding at this index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_binding_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Get the number of bindings in this interaction profile.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="bindings" type="Array" setter="set_bindings" getter="get_bindings" default="[]">
|
||||
Action bindings for this interaction profile.
|
||||
</member>
|
||||
<member name="interaction_profile_path" type="String" setter="set_interaction_profile_path" getter="get_interaction_profile_path" default="""">
|
||||
The interaction profile path identifying the XR device.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRInteractionProfileMetadata" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Meta class registering supported devices in OpenXR.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class allows OpenXR core and extensions to register metadata relating to supported interaction devices such as controllers, trackers, haptic devices, etc. It is primarily used by the action map editor and to sanitize any action map by removing extension-dependent entries when applicable.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="register_interaction_profile">
|
||||
<return type="void" />
|
||||
<param index="0" name="display_name" type="String" />
|
||||
<param index="1" name="openxr_path" type="String" />
|
||||
<param index="2" name="openxr_extension_name" type="String" />
|
||||
<description>
|
||||
Registers an interaction profile using its OpenXR designation (e.g. [code]/interaction_profiles/khr/simple_controller[/code] is the profile for OpenXR's simple controller profile).
|
||||
[param display_name] is the description shown to the user. [param openxr_path] is the interaction profile path being registered. [param openxr_extension_name] optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_io_path">
|
||||
<return type="void" />
|
||||
<param index="0" name="interaction_profile" type="String" />
|
||||
<param index="1" name="display_name" type="String" />
|
||||
<param index="2" name="toplevel_path" type="String" />
|
||||
<param index="3" name="openxr_path" type="String" />
|
||||
<param index="4" name="openxr_extension_name" type="String" />
|
||||
<param index="5" name="action_type" type="int" enum="OpenXRAction.ActionType" />
|
||||
<description>
|
||||
Registers an input/output path for the given [param interaction_profile]. The profile should previously have been registered using [method register_interaction_profile]. [param display_name] is the description shown to the user. [param toplevel_path] specifies the bind path this input/output can be bound to (e.g. [code]/user/hand/left[/code] or [code]/user/hand/right[/code]). [param openxr_path] is the action input/output being registered (e.g. [code]/user/hand/left/input/aim/pose[/code]). [param openxr_extension_name] restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. [code]XR_EXT_palm_pose[/code] that introduces [code]…/input/palm_ext/pose[/code] input paths). [param action_type] defines the type of input or output provided by OpenXR.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_profile_rename">
|
||||
<return type="void" />
|
||||
<param index="0" name="old_name" type="String" />
|
||||
<param index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_top_level_path">
|
||||
<return type="void" />
|
||||
<param index="0" name="display_name" type="String" />
|
||||
<param index="1" name="openxr_path" type="String" />
|
||||
<param index="2" name="openxr_extension_name" type="String" />
|
||||
<description>
|
||||
Registers a top level path to which profiles can be bound. For instance [code]/user/hand/left[/code] refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register [code]/user/body/vest[/code].
|
||||
[param display_name] is the name shown to the user. [param openxr_path] is the top level path being registered. [param openxr_extension_name] is optional and ensures the top level path is only used if the specified extension is available/enabled.
|
||||
When a top level path ends up being bound by OpenXR, a [XRPositionalTracker] is instantiated to manage the state of the device.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
</class>
|
||||
342
engine/modules/openxr/doc_classes/OpenXRInterface.xml
Normal file
342
engine/modules/openxr/doc_classes/OpenXRInterface.xml
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="OpenXRInterface" inherits="XRInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Our OpenXR interface.
|
||||
</brief_description>
|
||||
<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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Setting up XR">$DOCS_URL/tutorials/xr/setting_up_xr.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_action_sets" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of action sets registered with Godot (loaded from the action map at runtime).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_available_display_refresh_rates" qualifiers="const">
|
||||
<return type="Array" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_angular_velocity" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_angular_velocity] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns the angular velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D]!
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_flags" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_flags] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="int" enum="OpenXRInterface.HandJointFlags" is_bitfield="true" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns flags that inform us of the validity of the tracking data.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_linear_velocity" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_linear_velocity] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns the linear velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_position" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_transform] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns the position of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_radius" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_radius] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="float" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns the radius of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is without worldscale applied!
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_joint_rotation" qualifiers="const" deprecated="Use [method XRHandTracker.get_hand_joint_transform] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="joint" type="int" enum="OpenXRInterface.HandJoints" />
|
||||
<description>
|
||||
If handtracking is enabled, returns the rotation of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand_tracking_source" qualifiers="const" deprecated="Use [member XRHandTracker.hand_tracking_source] obtained from [method XRServer.get_tracker] instead.">
|
||||
<return type="int" enum="OpenXRInterface.HandTrackedSource" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<description>
|
||||
If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for [param hand].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_motion_range" qualifiers="const">
|
||||
<return type="int" enum="OpenXRInterface.HandMotionRange" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<description>
|
||||
If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_action_set_active" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given action set is active.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_eye_gaze_interaction_supported">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns the capabilities of the eye gaze interaction extension.
|
||||
[b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_foveation_supported" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value.
|
||||
[b]Note:[/b] This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set [member Viewport.vrs_mode] to [code]VRS_XR[/code] on desktop.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_hand_interaction_supported" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR's hand interaction profile is supported and enabled.
|
||||
[b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_hand_tracking_supported">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OpenXR's hand tracking is supported and enabled.
|
||||
[b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_action_set_active">
|
||||
<return type="void" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<param index="1" name="active" type="bool" />
|
||||
<description>
|
||||
Sets the given action set as active or inactive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_motion_range">
|
||||
<return type="void" />
|
||||
<param index="0" name="hand" type="int" enum="OpenXRInterface.Hand" />
|
||||
<param index="1" name="motion_range" type="int" enum="OpenXRInterface.HandMotionRange" />
|
||||
<description>
|
||||
If handtracking is enabled and motion range is supported, sets the currently configured motion range for [param hand] to [param motion_range].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="display_refresh_rate" type="float" setter="set_display_refresh_rate" getter="get_display_refresh_rate" default="0.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="foveation_dynamic" type="bool" setter="set_foveation_dynamic" getter="get_foveation_dynamic" default="false">
|
||||
Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and [member foveation_level].
|
||||
[b]Note:[/b] Only works on compatibility renderer.
|
||||
</member>
|
||||
<member name="foveation_level" type="int" setter="set_foveation_level" getter="get_foveation_level" default="0">
|
||||
Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible.
|
||||
[b]Note:[/b] Only works on compatibility renderer.
|
||||
</member>
|
||||
<member name="render_target_size_multiplier" type="float" setter="set_render_target_size_multiplier" getter="get_render_target_size_multiplier" default="1.0">
|
||||
The render size multiplier for the current HMD. Must be set before the interface has been initialized.
|
||||
</member>
|
||||
<member name="vrs_min_radius" type="float" setter="set_vrs_min_radius" getter="get_vrs_min_radius" default="20.0">
|
||||
The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
|
||||
[b]Note:[/b] Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR].
|
||||
</member>
|
||||
<member name="vrs_strength" type="float" setter="set_vrs_strength" getter="get_vrs_strength" default="1.0">
|
||||
The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality.
|
||||
[b]Note:[/b] Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR].
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="instance_exiting">
|
||||
<description>
|
||||
Informs our OpenXR instance is exiting.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="pose_recentered">
|
||||
<description>
|
||||
Informs the user queued a recenter of the player position.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="refresh_rate_changed">
|
||||
<param index="0" name="refresh_rate" type="float" />
|
||||
<description>
|
||||
Informs the user the HMD refresh rate has changed.
|
||||
[b]Note:[/b] Only emitted if XR runtime supports the refresh rate extension.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="session_begun">
|
||||
<description>
|
||||
Informs our OpenXR session has been started.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="session_focussed">
|
||||
<description>
|
||||
Informs our OpenXR session now has focus.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="session_loss_pending">
|
||||
<description>
|
||||
Informs our OpenXR session is in the process of being lost.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="session_stopping">
|
||||
<description>
|
||||
Informs our OpenXR session is stopping.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="session_visible">
|
||||
<description>
|
||||
Informs our OpenXR session is now visible (output is being sent to the HMD).
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
<constants>
|
||||
<constant name="HAND_LEFT" value="0" enum="Hand">
|
||||
Left hand.
|
||||
</constant>
|
||||
<constant name="HAND_RIGHT" value="1" enum="Hand">
|
||||
Right hand.
|
||||
</constant>
|
||||
<constant name="HAND_MAX" value="2" enum="Hand">
|
||||
Maximum value for the hand enum.
|
||||
</constant>
|
||||
<constant name="HAND_MOTION_RANGE_UNOBSTRUCTED" value="0" enum="HandMotionRange">
|
||||
Full hand range, if user closes their hands, we make a full fist.
|
||||
</constant>
|
||||
<constant name="HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER" value="1" enum="HandMotionRange">
|
||||
Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.
|
||||
</constant>
|
||||
<constant name="HAND_MOTION_RANGE_MAX" value="2" enum="HandMotionRange">
|
||||
Maximum value for the motion range enum.
|
||||
</constant>
|
||||
<constant name="HAND_TRACKED_SOURCE_UNKNOWN" value="0" enum="HandTrackedSource">
|
||||
The source of hand tracking data is unknown (the extension is likely unsupported).
|
||||
</constant>
|
||||
<constant name="HAND_TRACKED_SOURCE_UNOBSTRUCTED" value="1" enum="HandTrackedSource">
|
||||
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.
|
||||
</constant>
|
||||
<constant name="HAND_TRACKED_SOURCE_CONTROLLER" value="2" enum="HandTrackedSource">
|
||||
The source of hand tracking is a controller, bone positions are inferred from controller inputs.
|
||||
</constant>
|
||||
<constant name="HAND_TRACKED_SOURCE_MAX" value="3" enum="HandTrackedSource">
|
||||
Maximum value for the hand tracked source enum.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_PALM" value="0" enum="HandJoints">
|
||||
Palm joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_WRIST" value="1" enum="HandJoints">
|
||||
Wrist joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_THUMB_METACARPAL" value="2" enum="HandJoints">
|
||||
Thumb metacarpal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_THUMB_PROXIMAL" value="3" enum="HandJoints">
|
||||
Thumb proximal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_THUMB_DISTAL" value="4" enum="HandJoints">
|
||||
Thumb distal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_THUMB_TIP" value="5" enum="HandJoints">
|
||||
Thumb tip joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_INDEX_METACARPAL" value="6" enum="HandJoints">
|
||||
Index metacarpal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_INDEX_PROXIMAL" value="7" enum="HandJoints">
|
||||
Index proximal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_INDEX_INTERMEDIATE" value="8" enum="HandJoints">
|
||||
Index intermediate joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_INDEX_DISTAL" value="9" enum="HandJoints">
|
||||
Index distal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_INDEX_TIP" value="10" enum="HandJoints">
|
||||
Index tip joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MIDDLE_METACARPAL" value="11" enum="HandJoints">
|
||||
Middle metacarpal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MIDDLE_PROXIMAL" value="12" enum="HandJoints">
|
||||
Middle proximal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MIDDLE_INTERMEDIATE" value="13" enum="HandJoints">
|
||||
Middle intermediate joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MIDDLE_DISTAL" value="14" enum="HandJoints">
|
||||
Middle distal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MIDDLE_TIP" value="15" enum="HandJoints">
|
||||
Middle tip joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_RING_METACARPAL" value="16" enum="HandJoints">
|
||||
Ring metacarpal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_RING_PROXIMAL" value="17" enum="HandJoints">
|
||||
Ring proximal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_RING_INTERMEDIATE" value="18" enum="HandJoints">
|
||||
Ring intermediate joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_RING_DISTAL" value="19" enum="HandJoints">
|
||||
Ring distal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_RING_TIP" value="20" enum="HandJoints">
|
||||
Ring tip joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LITTLE_METACARPAL" value="21" enum="HandJoints">
|
||||
Little metacarpal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LITTLE_PROXIMAL" value="22" enum="HandJoints">
|
||||
Little proximal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LITTLE_INTERMEDIATE" value="23" enum="HandJoints">
|
||||
Little intermediate joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LITTLE_DISTAL" value="24" enum="HandJoints">
|
||||
Little distal joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LITTLE_TIP" value="25" enum="HandJoints">
|
||||
Little tip joint.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_MAX" value="26" enum="HandJoints">
|
||||
Maximum value for the hand joint enum.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_NONE" value="0" enum="HandJointFlags" is_bitfield="true">
|
||||
No flags are set.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_ORIENTATION_VALID" value="1" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_ORIENTATION_TRACKED" value="2" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_POSITION_VALID" value="4" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_POSITION_TRACKED" value="8" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_LINEAR_VELOCITY_VALID" value="16" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.
|
||||
</constant>
|
||||
<constant name="HAND_JOINT_ANGULAR_VELOCITY_VALID" value="32" enum="HandJointFlags" is_bitfield="true">
|
||||
If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
Loading…
Add table
Add a link
Reference in a new issue