[][src]Struct gdnative::api::ARVRInterface

pub struct ARVRInterface { /* fields omitted */ }

core class ARVRInterface inherits Reference (reference counted).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

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

impl ARVRInterface[src]

Constants

impl ARVRInterface[src]

pub fn anchor_detection_is_enabled(&self) -> bool[src]

On an AR interface, [code]true[/code] if anchor detection is enabled.

pub fn get_camera_feed_id(&self) -> i64[src]

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.

pub fn get_capabilities(&self) -> i64[src]

Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.

pub fn get_name(&self) -> GodotString[src]

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

pub fn get_render_targetsize(&self) -> Vector2D<f32, UnknownUnit>[src]

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

pub fn get_tracking_status(&self) -> TrackingStatus[src]

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.

pub fn initialize(&self) -> bool[src]

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.
				[b]Note:[/b] 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.

pub fn is_initialized(&self) -> bool[src]

[code]true[/code] if this interface been initialized.

pub fn is_primary(&self) -> bool[src]

[code]true[/code] if this is the primary interface.

pub fn is_stereo(&self) -> bool[src]

Returns [code]true[/code] if the current output of this interface is in stereo.

pub fn set_anchor_detection_is_enabled(&self, enable: bool)[src]

On an AR interface, [code]true[/code] if anchor detection is enabled.

pub fn set_is_initialized(&self, initialized: bool)[src]

[code]true[/code] if this interface been initialized.

pub fn set_is_primary(&self, enable: bool)[src]

[code]true[/code] if this is the primary interface.

pub fn uninitialize(&self)[src]

Turns the interface off.

Methods from Deref<Target = Reference>

pub fn init_ref(&self) -> bool[src]

Initializes the internal reference counter. Use this only if you really know what you are doing.
				Returns whether the initialization was successful.

Trait Implementations

impl Debug for ARVRInterface[src]

impl Deref for ARVRInterface[src]

type Target = Reference

The resulting type after dereferencing.

impl DerefMut for ARVRInterface[src]

impl GodotObject for ARVRInterface[src]

type RefKind = RefCounted

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl SubClass<ARVRInterface> for MobileVRInterface[src]

impl SubClass<ARVRInterface> for ARVRInterfaceGDNative[src]

impl SubClass<Object> for ARVRInterface[src]

impl SubClass<Reference> for ARVRInterface[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.