pub struct ParticleMaterial {
pub name: String,
pub mat_type: MaterialType,
pub base_color: Vec4,
pub emission: f32,
pub roughness: f32,
pub char_set: Vec<char>,
}Fields§
§name: String§mat_type: MaterialType§base_color: Vec4§emission: f32§roughness: f32§char_set: Vec<char>Implementations§
Source§impl ParticleMaterial
impl ParticleMaterial
pub fn new(name: impl Into<String>, mat_type: MaterialType) -> Self
pub fn shade(&self, normal: Vec3, light_dir: Vec3, view_dir: Vec3) -> Vec4
pub fn glyph_for_shade(&self, shade: f32) -> char
pub fn apply_to_particle( &self, p: &mut ModelParticle, light_dir: Vec3, view_dir: Vec3, )
Trait Implementations§
Source§impl Clone for ParticleMaterial
impl Clone for ParticleMaterial
Auto Trait Implementations§
impl Freeze for ParticleMaterial
impl RefUnwindSafe for ParticleMaterial
impl Send for ParticleMaterial
impl Sync for ParticleMaterial
impl Unpin for ParticleMaterial
impl UnsafeUnpin for ParticleMaterial
impl UnwindSafe for ParticleMaterial
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.