pub struct XrFbRenderModel { /* private fields */ }
Expand description
Main struct for XR_FB_render_model extension
Implementations§
Source§impl XrFbRenderModel
impl XrFbRenderModel
Sourcepub fn new(with_log: bool) -> Option<Self>
pub fn new(with_log: bool) -> Option<Self>
Creates a new XrFbRenderModel instance if the extension is supported
Sourcepub fn enumerate_render_model_paths(&self) -> Result<Vec<String>, XrResult>
pub fn enumerate_render_model_paths(&self) -> Result<Vec<String>, XrResult>
Enumerates available render model paths
Sourcepub fn get_render_model_properties(
&self,
model_path: &str,
) -> Result<RenderModelProperties, XrResult>
pub fn get_render_model_properties( &self, model_path: &str, ) -> Result<RenderModelProperties, XrResult>
Gets render model properties for a given model path
Sourcepub fn load_render_model(&self, model_path: &str) -> Result<Vec<u8>, XrResult>
pub fn load_render_model(&self, model_path: &str) -> Result<Vec<u8>, XrResult>
Loads render model data for a given model path
Sourcepub fn get_controller_model(
&mut self,
handed: Handed,
model_path: &str,
) -> Result<&Model, Box<dyn Error>>
pub fn get_controller_model( &mut self, handed: Handed, model_path: &str, ) -> Result<&Model, Box<dyn Error>>
Get cached controller model using specified path and hand, loading it if necessary
Sourcepub fn setup_controller_models(
&mut self,
left_path: &str,
right_path: &str,
with_animation: bool,
) -> Result<(), XrResult>
pub fn setup_controller_models( &mut self, left_path: &str, right_path: &str, with_animation: bool, ) -> Result<(), XrResult>
Loads and configures controller models for both hands using specified paths
Sourcepub fn disable_controller_models(&mut self)
pub fn disable_controller_models(&mut self)
Disables controller models by setting them to None
Sourcepub fn explore_render_models(&self) -> Result<(), XrResult>
pub fn explore_render_models(&self) -> Result<(), XrResult>
Explores and logs information about all available render models
Sourcepub fn set_controller_anim_time(&mut self, handed: Handed, time: f32)
pub fn set_controller_anim_time(&mut self, handed: Handed, time: f32)
Sets the animation time for a specific controller
§Arguments
handed
- Which controller to modify (Left or Right)time
- The animation time in seconds
Auto Trait Implementations§
impl Freeze for XrFbRenderModel
impl RefUnwindSafe for XrFbRenderModel
impl !Send for XrFbRenderModel
impl !Sync for XrFbRenderModel
impl Unpin for XrFbRenderModel
impl UnwindSafe for XrFbRenderModel
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.