diff options
Diffstat (limited to 'doc/classes/XRServer.xml')
-rw-r--r-- | doc/classes/XRServer.xml | 107 |
1 files changed, 55 insertions, 52 deletions
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 75a05bef17..85170804cc 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -10,13 +10,24 @@ <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> + <method name="add_interface"> + <return type="void" /> + <argument index="0" name="interface" type="XRInterface" /> + <description> + Registers an [XRInterface] object. + </description> + </method> + <method name="add_tracker"> + <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. @@ -27,88 +38,88 @@ </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="Transform"> - </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 OS.get_ticks_usec]. + 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 OS.get_ticks_usec]. + 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="Transform"> - </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" /> + <argument index="0" name="interface" type="XRInterface" /> + <description> + Removes this interface. + </description> + </method> + <method name="remove_tracker"> + <return type="void" /> + <argument index="0" name="tracker" type="XRPositionalTracker" /> + <description> + Removes this positional tracker. + </description> + </method> </methods> <members> <member name="primary_interface" type="XRInterface" setter="set_primary_interface" getter="get_primary_interface"> @@ -120,37 +131,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> |