summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/ARVRAnchor.xml7
-rw-r--r--doc/classes/ARVRInterface.xml88
-rw-r--r--doc/classes/ARVRScriptInterface.xml43
-rw-r--r--doc/classes/ARVRServer.xml32
4 files changed, 124 insertions, 46 deletions
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index 4ff39390b2..6e11034073 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -34,6 +34,13 @@
Returns true if the anchor is being tracked and false if no anchor with this id is currently known.
</description>
</method>
+ <method name="get_plane" qualifiers="const">
+ <return type="Plane">
+ </return>
+ <description>
+ Returns a plane aligned with our anchor, handy for intersection testing
+ </description>
+ </method>
<method name="get_size" qualifiers="const">
<return type="Vector3">
</return>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index fad9571628..1c2e761b57 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -12,6 +12,20 @@
<demos>
</demos>
<methods>
+ <method name="get_anchor_detection_is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if achor detection is enabled (AR only).
+ </description>
+ </method>
+ <method name="get_capabilities" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns a combination of flags providing information about the capabilities of this interface.
+ </description>
+ </method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
@@ -26,11 +40,11 @@
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
</description>
</method>
- <method name="hmd_is_present">
- <return type="bool">
+ <method name="get_tracking_status" qualifiers="const">
+ <return type="int" enum="ARVRInterface.Tracking_status">
</return>
<description>
- Returns true if an HMD is available for this interface.
+ 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="initialize">
@@ -51,34 +65,45 @@
Returns true if this interface is active.
</description>
</method>
- <method name="is_installed">
+ <method name="is_primary">
<return type="bool">
</return>
<description>
- Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false.
+ Returns true if this interface is currently the primary interface (the interface responsible for showing the output).
</description>
</method>
- <method name="is_primary">
+ <method name="is_stereo">
<return type="bool">
</return>
<description>
- Returns true if this interface is currently the primary interface (the interface responsible for showing the output).
+ Returns true if the current output of this interface is in stereo.
</description>
</method>
- <method name="set_is_primary">
+ <method name="set_anchor_detection_is_enabled">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set this interface to the primary interface (unset the old one).
+ Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points.
</description>
</method>
- <method name="supports_hmd">
- <return type="bool">
+ <method name="set_is_initialized">
+ <return type="void">
+ </return>
+ <argument index="0" name="initialized" type="bool">
+ </argument>
+ <description>
+ Initialise/uninitilise this interface (same effect as calling intialize/uninitialize).
+ </description>
+ </method>
+ <method name="set_is_primary">
+ <return type="void">
</return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
<description>
- Returns true if this interface supports HMDs and by extension uses stereo scopic rendering.
+ Set this interface to the primary interface (unset the old one).
</description>
</method>
<method name="uninitialize">
@@ -90,10 +115,32 @@
</method>
</methods>
<members>
- <member name="primary" type="bool" setter="set_is_primary" getter="is_primary">
+ <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled">
+ On an AR interface, is our anchor detection enabled?
+ </member>
+ <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized">
+ Has this interface been initialized?
+ </member>
+ <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary">
+ Is this our primary interface?
</member>
</members>
<constants>
+ <constant name="ARVR_NONE" value="0">
+ No ARVR capabilities.
+ </constant>
+ <constant name="ARVR_MONO" value="1">
+ This interface can work with normal rendering output (non-HMD based AR).
+ </constant>
+ <constant name="ARVR_STEREO" value="2">
+ This interface supports stereoscopic rendering.
+ </constant>
+ <constant name="ARVR_AR" value="4">
+ This interface support AR (video background and real world tracking).
+ </constant>
+ <constant name="ARVR_EXTERNAL" value="8">
+ This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_recommended_render_targetsize. Using a seperate viewport node frees up the main viewport for other purposes.
+ </constant>
<constant name="EYE_MONO" value="0">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
</constant>
@@ -103,5 +150,20 @@
<constant name="EYE_RIGHT" value="2">
Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
</constant>
+ <constant name="ARVR_NORMAL_TRACKING" value="0">
+ Tracking is behaving as expected.
+ </constant>
+ <constant name="ARVR_EXCESSIVE_MOTION" value="1">
+ Tracking is hindered by excessive motion, player is moving faster then tracking can keep up.
+ </constant>
+ <constant name="ARVR_INSUFFICIENT_FEATURES" value="2">
+ Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc.
+ </constant>
+ <constant name="ARVR_UNKNOWN_TRACKING" value="3">
+ We don't know the status of the tracking or this interface does not provide feedback.
+ </constant>
+ <constant name="ARVR_NOT_TRACKING" value="4">
+ Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.)
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml
index 54415539e0..182147a015 100644
--- a/doc/classes/ARVRScriptInterface.xml
+++ b/doc/classes/ARVRScriptInterface.xml
@@ -29,6 +29,20 @@
Outputs a finished render buffer to the AR/VR device for the given eye.
</description>
</method>
+ <method name="get_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if achor detection is enabled (AR only).
+ </description>
+ </method>
+ <method name="get_capabilities" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ Returns a combination of flags providing information about the capabilities of this interface.
+ </description>
+ </method>
<method name="get_recommended_render_targetsize" qualifiers="virtual">
<return type="Vector2">
</return>
@@ -36,6 +50,13 @@
Returns the size at which we should render our scene to get optimal quality on the output device.
</description>
</method>
+ <method name="get_tracking_status" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ 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_eye" qualifiers="virtual">
<return type="Transform">
</return>
@@ -47,13 +68,6 @@
Get the location and orientation transform used when rendering a specific eye.
</description>
</method>
- <method name="hmd_is_present" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Return true is an HMD is available.
- </description>
- </method>
<method name="initialize" qualifiers="virtual">
<return type="bool">
</return>
@@ -68,13 +82,6 @@
Returns true if this interface has been initialized and is active.
</description>
</method>
- <method name="is_installed" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Returns true if the required middleware is installed.
- </description>
- </method>
<method name="is_stereo" qualifiers="virtual">
<return type="bool">
</return>
@@ -89,11 +96,13 @@
Gets called before rendering each frame so tracking data gets updated in time.
</description>
</method>
- <method name="supports_hmd" qualifiers="virtual">
- <return type="bool">
+ <method name="set_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="void">
</return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
<description>
- Returns true if this interface supports HMDs.
+ Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points.
</description>
</method>
<method name="uninitialize" qualifiers="virtual">
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 282f25bec9..6a7262bd14 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -20,6 +20,22 @@
Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server.
</description>
</method>
+ <method name="center_on_hmd">
+ <return type="void">
+ </return>
+ <argument index="0" name="ignore_tilt" type="bool">
+ </argument>
+ <argument index="1" name="keep_height" type="bool">
+ </argument>
+ <description>
+ This is a really 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.
+ For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera.
+ This method allows you to center our tracker on the location of the HMD, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world.
+ For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game.
+ You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
+ </description>
+ </method>
<method name="find_interface" qualifiers="const">
<return type="ARVRInterface">
</return>
@@ -84,22 +100,6 @@
Removes a registered interface, again exposed mostly for GDNative based interfaces.
</description>
</method>
- <method name="request_reference_frame">
- <return type="void">
- </return>
- <argument index="0" name="ignore_tilt" type="bool">
- </argument>
- <argument index="1" name="keep_height" type="bool">
- </argument>
- <description>
- This is a really 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.
- For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera.
- This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world.
- For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game.
- You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
- </description>
- </method>
<method name="set_primary_interface">
<return type="void">
</return>