pub struct Interaction;
Expand description
Controls for the interaction system, and the interactors that StereoKit provides by default. https://stereokit.net/Pages/StereoKit/Interaction.html
see also DefaultInteractors
Interactor
§Examples
use stereokit_rust::system::{Interaction, DefaultInteractors};
// Set the default interactors
Interaction::set_default_interactors(DefaultInteractors::Default);
// Check what interactors are currently set
let current_interactors = Interaction::get_default_interactors();
// Disable the default drawing of interactor indicators
Interaction::set_default_draw(false);
// Check if default drawing is enabled
let draw_enabled = Interaction::get_default_draw();
Implementations§
Source§impl Interaction
impl Interaction
Sourcepub fn get_default_interactors() -> DefaultInteractors
pub fn get_default_interactors() -> DefaultInteractors
This allows you to control what kind of interactors StereoKit will provide for you. This also allows you to entirely disable StereoKit’s interactors so you can just use custom ones! https://stereokit.net/Pages/StereoKit/Interaction/DefaultInteractors.html
see also interaction_get_default_interactors
Interaction::set_default_interactors
Sourcepub fn set_default_interactors(default_interactors: DefaultInteractors)
pub fn set_default_interactors(default_interactors: DefaultInteractors)
Set what kind of interactors StereoKit will provide for you. https://stereokit.net/Pages/StereoKit/Interaction/DefaultInteractors.html
see also interaction_set_default_interactors
Interaction::get_default_interactors
Sourcepub fn get_default_draw() -> bool
pub fn get_default_draw() -> bool
By default, StereoKit will draw indicators for some of the default interactors, such as the far interaction / aiming rays. This doesn’t affect custom interactors. Setting this to false will prevent StereoKit from drawing any of these indicators. https://stereokit.net/Pages/StereoKit/Interaction/DefaultDraw.html
see also interaction_get_default_draw
Interaction::set_default_draw
Sourcepub fn set_default_draw(draw_interactors: bool)
pub fn set_default_draw(draw_interactors: bool)
Set whether StereoKit should draw indicators for the default interactors. https://stereokit.net/Pages/StereoKit/Interaction/DefaultDraw.html
see also interaction_set_default_draw
Interaction::get_default_draw
Auto Trait Implementations§
impl Freeze for Interaction
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnwindSafe for Interaction
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> 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.