[][src]Struct gdnative::api::MobileVRInterface

pub struct MobileVRInterface { /* fields omitted */ }

core class MobileVRInterface inherits ARVRInterface (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

MobileVRInterface 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 MobileVRInterface[src]

pub fn new() -> Ref<MobileVRInterface, Unique>[src]

Creates a new instance of this object.

This is a reference-counted type. The returned object is automatically managed by Ref.

pub fn display_to_lens(&self) -> f64[src]

pub fn display_width(&self) -> f64[src]

pub fn eye_height(&self) -> f64[src]

pub fn iod(&self) -> f64[src]

pub fn k1(&self) -> f64[src]

pub fn k2(&self) -> f64[src]

pub fn oversample(&self) -> f64[src]

pub fn set_display_to_lens(&self, display_to_lens: f64)[src]

pub fn set_display_width(&self, display_width: f64)[src]

pub fn set_eye_height(&self, eye_height: f64)[src]

pub fn set_iod(&self, iod: f64)[src]

pub fn set_k1(&self, k: f64)[src]

pub fn set_k2(&self, k: f64)[src]

pub fn set_oversample(&self, oversample: f64)[src]

Methods from Deref<Target = ARVRInterface>

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.

Trait Implementations

impl Debug for MobileVRInterface[src]

impl Deref for MobileVRInterface[src]

type Target = ARVRInterface

The resulting type after dereferencing.

impl DerefMut for MobileVRInterface[src]

impl GodotObject for MobileVRInterface[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 Instanciable for MobileVRInterface[src]

impl SubClass<ARVRInterface> for MobileVRInterface[src]

impl SubClass<Object> for MobileVRInterface[src]

impl SubClass<Reference> for MobileVRInterface[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.