ARVRInterface

Base class for an AR/VR interface implementation.

This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Capabilities
enum Capabilities
Constants
enum Constants
Eyes
enum Eyes
Tracking_status
enum Tracking_status

Functions

getAnchorDetectionIsEnabled
bool getAnchorDetectionIsEnabled()
getCameraFeedId
long getCameraFeedId()

If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the CameraServer for this interface.

getCapabilities
long getCapabilities()

Returns a combination of capabilities flags providing information about the capabilities of this interface.

getName
String getName()

Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).

getRenderTargetsize
Vector2 getRenderTargetsize()

Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.

getTrackingStatus
ARVRInterface.Tracking_status getTrackingStatus()

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.

initialize
bool initialize()

Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. Note: You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.

isInitialized
bool isInitialized()
isPrimary
bool isPrimary()
isStereo
bool isStereo()

Returns true if the current output of this interface is in stereo.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(ARVRInterface other)
opEquals
bool opEquals(typeof(null) n)
setAnchorDetectionIsEnabled
void setAnchorDetectionIsEnabled(bool enable)
setIsInitialized
void setIsInitialized(bool initialized)
setIsPrimary
void setIsPrimary(bool enable)
toHash
size_t toHash()
uninitialize
void uninitialize()

Turns the interface off.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

arIsAnchorDetectionEnabled
bool arIsAnchorDetectionEnabled [@property getter]
bool arIsAnchorDetectionEnabled [@property setter]

On an AR interface, true if anchor detection is enabled.

interfaceIsInitialized
bool interfaceIsInitialized [@property getter]
bool interfaceIsInitialized [@property setter]

true if this interface been initialized.

interfaceIsPrimary
bool interfaceIsPrimary [@property getter]
bool interfaceIsPrimary [@property setter]

true if this is the primary interface.

Static functions

_new
ARVRInterface _new()

Construct a new instance of ARVRInterface. Note: use memnew!ARVRInterface instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta