Struct gdnative_bindings_lily::ARVRInterface [−][src]
pub struct ARVRInterface { /* fields omitted */ }
Expand description
core class ARVRInterface
inherits Reference
(reference counted).
Official documentation
See the documentation of this class in the Godot engine’s official documentation. The method descriptions are generated from it and typically contain code samples in GDScript, not Rust.
Memory management
The lifetime of this object is automatically managed through reference counting.
Class hierarchy
ARVRInterface inherits methods from:
Safety
All types in the Godot API have “interior mutability” in Rust parlance.
To enforce that the official thread-safety guidelines are
followed, the typestate pattern is used in the Ref
and TRef
smart pointers,
and the Instance
API. The typestate Access
in these types tracks whether the
access is unique, shared, or exclusive to the current thread. For more information,
see the type-level documentation on Ref
.
Implementations
Constants
On an AR interface, true
if anchor detection is enabled.
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.
Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
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.
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.
true
if this interface been initialized.
true
if this is the primary interface.
Returns true
if the current output of this interface is in stereo.
On an AR interface, true
if anchor detection is enabled.
true
if this interface been initialized.
true
if this is the primary interface.
Turns the interface off.
Methods from Deref<Target = Reference>
Trait Implementations
type RefKind = RefCounted
type RefKind = RefCounted
Creates an explicitly null reference of Self
as a method argument. This makes type
inference easier for the compiler compared to Option
. Read more
Creates a new instance of Self
using a zero-argument constructor, as a Unique
reference. Read more
Performs a dynamic reference downcast to target type. Read more
Performs a static reference upcast to a supertype that is guaranteed to be valid. Read more
Creates a persistent reference to the same Godot object with shared thread access. Read more
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
Creates a persistent reference to the same Godot object with thread-local thread access. Read more
Creates a persistent reference to the same Godot object with unique access. Read more
Recovers a instance ID previously returned by Object::get_instance_id
if the object is
still alive. See also TRef::try_from_instance_id
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ARVRInterface
impl !Send for ARVRInterface
impl !Sync for ARVRInterface
impl Unpin for ARVRInterface
impl UnwindSafe for ARVRInterface