summaryrefslogtreecommitdiff
path: root/doc/classes/XRServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/XRServer.xml')
-rw-r--r--doc/classes/XRServer.xml105
1 files changed, 35 insertions, 70 deletions
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 149e177700..5dd9b75ad2 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -11,30 +11,23 @@
</tutorials>
<methods>
<method name="add_interface">
- <return type="void">
- </return>
- <argument index="0" name="interface" type="XRInterface">
- </argument>
+ <return type="void" />
+ <argument index="0" name="interface" type="XRInterface" />
<description>
Registers an [XRInterface] object.
</description>
</method>
<method name="add_tracker">
- <return type="void">
- </return>
- <argument index="0" name="tracker" type="XRPositionalTracker">
- </argument>
+ <return type="void" />
+ <argument index="0" name="tracker" type="XRPositionalTracker" />
<description>
Registers a new [XRPositionalTracker] that tracks a spatial location in real space.
</description>
</method>
<method name="center_on_hmd">
- <return type="void">
- </return>
- <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode">
- </argument>
- <argument index="1" name="keep_height" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode" />
+ <argument index="1" name="keep_height" type="bool" />
<description>
This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
@@ -45,111 +38,91 @@
</description>
</method>
<method name="clear_primary_interface_if">
- <return type="void">
- </return>
- <argument index="0" name="interface" type="XRInterface">
- </argument>
+ <return type="void" />
+ <argument index="0" name="interface" type="XRInterface" />
<description>
Clears our current primary interface if it is set to the provided interface.
</description>
</method>
<method name="find_interface" qualifiers="const">
- <return type="XRInterface">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
+ <return type="XRInterface" />
+ <argument index="0" name="name" type="String" />
<description>
Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
<method name="get_hmd_transform">
- <return type="Transform3D">
- </return>
+ <return type="Transform3D" />
<description>
Returns the primary interface's transformation.
</description>
</method>
<method name="get_interface" qualifiers="const">
- <return type="XRInterface">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
+ <return type="XRInterface" />
+ <argument index="0" name="idx" type="int" />
<description>
Returns the interface registered at a given index in our list of interfaces.
</description>
</method>
<method name="get_interface_count" qualifiers="const">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code].
</description>
</method>
<method name="get_interfaces" qualifiers="const">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
Returns a list of available interfaces the ID and name of each interface.
</description>
</method>
<method name="get_last_commit_usec">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Returns the absolute timestamp (in μs) of the last [XRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method Time.get_ticks_usec].
</description>
</method>
<method name="get_last_frame_usec">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing.
</description>
</method>
<method name="get_last_process_usec">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method Time.get_ticks_usec].
</description>
</method>
<method name="get_reference_frame" qualifiers="const">
- <return type="Transform3D">
- </return>
+ <return type="Transform3D" />
<description>
Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
</description>
</method>
<method name="get_tracker" qualifiers="const">
- <return type="XRPositionalTracker">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
+ <return type="XRPositionalTracker" />
+ <argument index="0" name="idx" type="int" />
<description>
Returns the positional tracker at the given ID.
</description>
</method>
<method name="get_tracker_count" qualifiers="const">
- <return type="int">
- </return>
+ <return type="int" />
<description>
Returns the number of trackers currently registered.
</description>
</method>
<method name="remove_interface">
- <return type="void">
- </return>
- <argument index="0" name="interface" type="XRInterface">
- </argument>
+ <return type="void" />
+ <argument index="0" name="interface" type="XRInterface" />
<description>
Removes this interface.
</description>
</method>
<method name="remove_tracker">
- <return type="void">
- </return>
- <argument index="0" name="tracker" type="XRPositionalTracker">
- </argument>
+ <return type="void" />
+ <argument index="0" name="tracker" type="XRPositionalTracker" />
<description>
Removes this positional tracker.
</description>
@@ -165,37 +138,29 @@
</members>
<signals>
<signal name="interface_added">
- <argument index="0" name="interface_name" type="StringName">
- </argument>
+ <argument index="0" name="interface_name" type="StringName" />
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
- <argument index="0" name="interface_name" type="StringName">
- </argument>
+ <argument index="0" name="interface_name" type="StringName" />
<description>
Emitted when an interface is removed.
</description>
</signal>
<signal name="tracker_added">
- <argument index="0" name="tracker_name" type="StringName">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
+ <argument index="0" name="tracker_name" type="StringName" />
+ <argument index="1" name="type" type="int" />
+ <argument index="2" name="id" type="int" />
<description>
Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [XRAnchor3D]s for an AR solution, it is important to react to this signal to add the appropriate [XRController3D] or [XRAnchor3D] nodes related to this new tracker.
</description>
</signal>
<signal name="tracker_removed">
- <argument index="0" name="tracker_name" type="StringName">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
+ <argument index="0" name="tracker_name" type="StringName" />
+ <argument index="1" name="type" type="int" />
+ <argument index="2" name="id" type="int" />
<description>
Emitted when a tracker is removed. You should remove any [XRController3D] or [XRAnchor3D] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
</description>