#[repr(u32)]pub enum OriginMode {
Local = 0,
Floor = 1,
Stage = 2,
}
Expand description
This describes where the origin of the application should be. While these origins map closely to OpenXR features, not all runtimes support each feature. StereoKit will provide reasonable fallback behavior in the event the origin mode isn’t directly supported. https://stereokit.net/Pages/StereoKit/OriginMode.html
se also SkSettings::origin
crate::system::World::get_origin_mode
Variants§
Local = 0
Default value : The origin will be at the location of the user’s head when the application starts, facing the same direction as the user. This mode is available on all runtimes, and will never fall back to another mode! However, due to variances in underlying behavior, StereoKit may introduce an origin offset to ensure consistent behavior.
Floor = 1
The origin will be at the floor beneath where the user starts, facing the direction of the user. If this mode is not natively supported, StereoKit will use the stage mode with an offset. If stage mode is unavailable, it will fall back to local mode with a -1.5 Y axis offset.
Stage = 2
The origin will be at the center of a safe play area or stage that the user or OS has defined, and will face one of the edges of the play area. If this mode is not natively supported, StereoKit will use the floor origin mode. If floor mode is unavailable, it will fall back to local mode with a -1.5 Y axis offset.
Trait Implementations§
Source§impl Clone for OriginMode
impl Clone for OriginMode
Source§fn clone(&self) -> OriginMode
fn clone(&self) -> OriginMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OriginMode
impl Debug for OriginMode
Source§impl PartialEq for OriginMode
impl PartialEq for OriginMode
impl Copy for OriginMode
impl Eq for OriginMode
impl StructuralPartialEq for OriginMode
Auto Trait Implementations§
impl Freeze for OriginMode
impl RefUnwindSafe for OriginMode
impl Send for OriginMode
impl Sync for OriginMode
impl Unpin for OriginMode
impl UnwindSafe for OriginMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.