pub struct Material { /* private fields */ }Expand description
Material definition with rendering properties
Materials define how surfaces are rendered. Each material contains one or more layers that specify textures and blending modes.
Implementations§
Source§impl Material
impl Material
Sourcepub fn priority_plane(&self) -> i32
pub fn priority_plane(&self) -> i32
Rendering priority (higher = render last); signed
pub fn set_priority_plane(&mut self, value: i32)
Sourcepub fn flags(&self) -> SequenceFlag
pub fn flags(&self) -> SequenceFlag
Material flags
pub fn set_flags(&mut self, value: SequenceFlag)
pub fn set_shader(&mut self, value: &str)
Sourcepub fn layers_len(&self) -> usize
pub fn layers_len(&self) -> usize
Rendering layers
Sourcepub fn layers(&self, index: usize) -> Option<Ref<'_, Layer>>
pub fn layers(&self, index: usize) -> Option<Ref<'_, Layer>>
Borrows element index in place. None when out of range.
pub fn layers_mut(&mut self, index: usize) -> Option<RefMut<'_, Layer>>
Sourcepub fn layers_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Layer>>
pub fn layers_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Layer>>
Iterate the elements, borrowing each in turn.
pub fn resize_layers(&mut self, count: usize)
Trait Implementations§
impl Send for Material
Auto Trait Implementations§
impl !Sync for Material
impl Freeze for Material
impl RefUnwindSafe for Material
impl Unpin for Material
impl UnsafeUnpin for Material
impl UnwindSafe for Material
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