pub struct Material<'a> {
pub name: &'a str,
pub color: Option<[f64; 4]>,
pub texture: Option<AssetId>,
}Expand description
How a visual is rendered.
A material is stated where it is used, and may also be added to the
structure’s own catalogue with RobotBuilder::material.
Fields§
§name: &'a strThe material’s name, which is how a structure refers to it.
color: Option<[f64; 4]>Linear RGBA in 0.0..=1.0, when the material states a colour.
texture: Option<AssetId>The texture image, when the material states one.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Material<'a>
impl<'a> RefUnwindSafe for Material<'a>
impl<'a> Send for Material<'a>
impl<'a> Sync for Material<'a>
impl<'a> Unpin for Material<'a>
impl<'a> UnsafeUnpin for Material<'a>
impl<'a> UnwindSafe for Material<'a>
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