summaryrefslogtreecommitdiff
path: root/doc/classes/XRInterface.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/XRInterface.xml')
-rw-r--r--doc/classes/XRInterface.xml71
1 files changed, 58 insertions, 13 deletions
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 26b7699af2..05d5eb6673 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -32,7 +32,17 @@
<method name="get_play_area" qualifiers="const">
<return type="PackedVector3Array" />
<description>
- Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualise the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ </description>
+ </method>
+ <method name="get_projection_for_view">
+ <return type="Projection" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="near" type="float" />
+ <param index="3" name="far" type="float" />
+ <description>
+ Returns the projection matrix for a view/eye.
</description>
</method>
<method name="get_render_target_size">
@@ -47,6 +57,16 @@
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
+ <method name="get_transform_for_view">
+ <return type="Transform3D" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="cam_transform" type="Transform3D" />
+ <description>
+ Returns the transform for a view/eye.
+ [param view] is the view/eye index.
+ [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D.
+ </description>
+ </method>
<method name="get_view_count">
<return type="int" />
<description>
@@ -66,35 +86,60 @@
<method name="is_initialized" qualifiers="const">
<return type="bool" />
<description>
- Is [code]true[/code] if this interface has been initialised.
+ Is [code]true[/code] if this interface has been initialized.
+ </description>
+ </method>
+ <method name="is_passthrough_enabled">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if passthrough is enabled.
+ </description>
+ </method>
+ <method name="is_passthrough_supported">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if this interface supports passthrough.
</description>
</method>
<method name="set_play_area_mode">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
Sets the active play area mode, will return [code]false[/code] if the mode can't be used with this interface.
</description>
</method>
+ <method name="start_passthrough">
+ <return type="bool" />
+ <description>
+ Starts passthrough, will return [code]false[/code] if passthrough couldn't be started.
+ [b]Note:[/b] The viewport used for XR must have a transparent background, otherwise passthrough may not properly render.
+ </description>
+ </method>
+ <method name="stop_passthrough">
+ <return type="void" />
+ <description>
+ Stops passthrough.
+ </description>
+ </method>
<method name="supports_play_area_mode">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
Call this to find out if a given play area mode is supported by this interface.
</description>
</method>
<method name="trigger_haptic_pulse">
<return type="void" />
- <argument index="0" name="action_name" type="String" />
- <argument index="1" name="tracker_name" type="StringName" />
- <argument index="2" name="frequency" type="float" />
- <argument index="3" name="amplitude" type="float" />
- <argument index="4" name="duration_sec" type="float" />
- <argument index="5" name="delay_sec" type="float" />
+ <param index="0" name="action_name" type="String" />
+ <param index="1" name="tracker_name" type="StringName" />
+ <param index="2" name="frequency" type="float" />
+ <param index="3" name="amplitude" type="float" />
+ <param index="4" name="duration_sec" type="float" />
+ <param index="5" name="delay_sec" type="float" />
<description>
Triggers a haptic pulse on a device associated with this interface.
- [code]action_name[/code] is the name of the action for this pulse.
- [code]tracker_name[/code] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic.
+ [param action_name] is the name of the action for this pulse.
+ [param tracker_name] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic.
</description>
</method>
<method name="uninitialize">
@@ -117,7 +162,7 @@
</members>
<signals>
<signal name="play_area_changed">
- <argument index="0" name="mode" type="int" />
+ <param index="0" name="mode" type="int" />
<description>
Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation.
</description>