pub struct Mesh {
pub name: String,
pub geometry: GeometryHandle,
pub material: MaterialHandle,
pub visible: bool,
pub cast_shadows: bool,
pub receive_shadows: bool,
pub render_order: i32,
/* private fields */
}Fields§
§name: String§geometry: GeometryHandle§material: MaterialHandle§visible: bool§cast_shadows: bool§receive_shadows: bool§render_order: i32Implementations§
Source§impl Mesh
impl Mesh
pub fn new(geometry: GeometryHandle, material: MaterialHandle) -> Mesh
Sourcepub fn morph_target_influences(&self) -> &[f32]
pub fn morph_target_influences(&self) -> &[f32]
Returns the morph target influences as a slice
pub fn morph_uniforms(&self) -> BufferReadGuard<'_, MorphUniforms>
pub fn morph_uniforms_mut(&mut self) -> BufferGuard<'_, MorphUniforms>
Sourcepub fn init_morph_targets(&mut self, target_count: u32, vertex_count: u32)
pub fn init_morph_targets(&mut self, target_count: u32, vertex_count: u32)
initialize morph target influences should be called after loading geometry
Sourcepub fn latch_previous_morph_weights(&mut self)
pub fn latch_previous_morph_weights(&mut self)
Calls this at the end of each frame to latch current morph target influences into the “previous” cache.
Sourcepub fn set_morph_target_influence(&mut self, index: usize, weight: f32)
pub fn set_morph_target_influence(&mut self, index: usize, weight: f32)
set influence for a single morph target
Sourcepub fn set_morph_target_influences(&mut self, weights: &[f32])
pub fn set_morph_target_influences(&mut self, weights: &[f32])
batch set morph target influences
Sourcepub fn update_morph_uniforms(&mut self)
pub fn update_morph_uniforms(&mut self)
update Morph Uniforms (sort, cull, and fill GPU buffer) should be called before each frame rendering
Trait Implementations§
Source§impl Bindings for Mesh
impl Bindings for Mesh
fn define_bindings<'a>(&'a self, builder: &mut ResourceBuilder<'a>)
Auto Trait Implementations§
impl !Freeze for Mesh
impl !RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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> 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>
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.