pub enum MaterialValue {
Bool(bool),
Int(i32),
Float(f32),
Vec2(Vec2),
Vec3(Vec3),
Vec4(Vec4),
Color(Vec4),
Texture(TextureRef),
UVec4([u32; 4]),
}Expand description
A single material property value. Strategies read these by PropertyId
via Material::get.
Variants§
Bool(bool)
Int(i32)
Float(f32)
Vec2(Vec2)
Vec3(Vec3)
Vec4(Vec4)
Color(Vec4)
Linear-space RGBA color. Kept distinct from Vec4 so tooling/UI can treat it differently (e.g. color picker) even though the payload is the same shape.
Texture(TextureRef)
UVec4([u32; 4])
Implementations§
Trait Implementations§
Source§impl Clone for MaterialValue
impl Clone for MaterialValue
Source§fn clone(&self) -> MaterialValue
fn clone(&self) -> MaterialValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MaterialValue
Source§impl Debug for MaterialValue
impl Debug for MaterialValue
Source§impl PartialEq for MaterialValue
impl PartialEq for MaterialValue
Source§fn eq(&self, other: &MaterialValue) -> bool
fn eq(&self, other: &MaterialValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MaterialValue
Auto Trait Implementations§
impl Freeze for MaterialValue
impl RefUnwindSafe for MaterialValue
impl Send for MaterialValue
impl Sync for MaterialValue
impl Unpin for MaterialValue
impl UnsafeUnpin for MaterialValue
impl UnwindSafe for MaterialValue
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