pub struct BaseMaterial { /* private fields */ }
Expand description
Base material that provides simply color and constant metallicness/roughness
Implementations§
Source§impl BaseMaterial
impl BaseMaterial
Sourcepub fn of_rgba(rgba: u32) -> Self
pub fn of_rgba(rgba: u32) -> Self
Create a new BaseMaterial of an RGB color and alpha
Sourcepub fn set_mr(&mut self, metallic: f32, roughness: f32)
pub fn set_mr(&mut self, metallic: f32, roughness: f32)
Set the metallicness and roughness value for the BaseMaterial
Trait Implementations§
Source§impl Debug for BaseMaterial
impl Debug for BaseMaterial
Source§impl Material for BaseMaterial
impl Material for BaseMaterial
Source§fn base_data(&self) -> &BaseData
fn base_data(&self) -> &BaseData
Borrow the basic data of a material - color and base
metallic/roughness, for example
Source§fn texture(&self, _aspect: MaterialAspect) -> ShortIndex
fn texture(&self, _aspect: MaterialAspect) -> ShortIndex
Get the index into the Textures array for a specific aspect
Auto Trait Implementations§
impl Freeze for BaseMaterial
impl RefUnwindSafe for BaseMaterial
impl Send for BaseMaterial
impl Sync for BaseMaterial
impl Unpin for BaseMaterial
impl UnwindSafe for BaseMaterial
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