[−][src]Struct gdnative_bindings::ARVRInterface
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
pub const ARVR_AR: i64
[src]
pub const ARVR_EXCESSIVE_MOTION: i64
[src]
pub const ARVR_EXTERNAL: i64
[src]
pub const ARVR_INSUFFICIENT_FEATURES: i64
[src]
pub const ARVR_MONO: i64
[src]
pub const ARVR_NONE: i64
[src]
pub const ARVR_NORMAL_TRACKING: i64
[src]
pub const ARVR_NOT_TRACKING: i64
[src]
pub const ARVR_STEREO: i64
[src]
pub const ARVR_UNKNOWN_TRACKING: i64
[src]
pub const EYE_LEFT: i64
[src]
pub const EYE_MONO: i64
[src]
pub const EYE_RIGHT: i64
[src]
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) -> Vector2
[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]
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
fn class_name() -> &'static str
[src]
fn null() -> Null<Self>
[src]
fn new() -> Ref<Self, Unique> where
Self: Instanciable,
[src]
Self: Instanciable,
fn cast<T>(&self) -> Option<&T> where
T: GodotObject + SubClass<Self>,
[src]
T: GodotObject + SubClass<Self>,
fn upcast<T>(&self) -> &T where
Self: SubClass<T>,
T: GodotObject,
[src]
Self: SubClass<T>,
T: GodotObject,
unsafe fn assume_shared(&self) -> Ref<Self, Shared>
[src]
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
[src]
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_unique(&self) -> Ref<Self, Unique>
[src]
impl Sealed for ARVRInterface
[src]
impl SubClass<ARVRInterface> for ARVRInterfaceGDNative
[src]
impl SubClass<ARVRInterface> for MobileVRInterface
[src]
impl SubClass<Object> for ARVRInterface
[src]
impl SubClass<Reference> for ARVRInterface
[src]
Auto Trait Implementations
impl RefUnwindSafe for ARVRInterface
impl !Send for ARVRInterface
impl !Sync for ARVRInterface
impl Unpin for ARVRInterface
impl UnwindSafe for ARVRInterface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SubClass<T> for T where
T: GodotObject,
[src]
T: GodotObject,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,