pub struct GltfMaterial {
pub name: String,
pub base_color_factor: [f32; 4],
pub metallic_factor: f32,
pub roughness_factor: f32,
pub emissive_factor: [f32; 3],
pub alpha_mode: String,
pub alpha_cutoff: f32,
pub double_sided: bool,
}Expand description
Material properties for a glTF primitive.
Fields§
§name: StringMaterial name.
base_color_factor: [f32; 4]Base color factor [r, g, b, a] (PBR metallic-roughness).
metallic_factor: f32Metallic factor (0.0 = dielectric, 1.0 = metal).
roughness_factor: f32Roughness factor (0.0 = smooth, 1.0 = rough).
emissive_factor: [f32; 3]Emissive factor [r, g, b].
alpha_mode: StringAlpha mode: “OPAQUE”, “MASK”, or “BLEND”.
alpha_cutoff: f32Alpha cutoff (only used when alpha_mode is “MASK”).
double_sided: boolWhether the material is double-sided.
Implementations§
Source§impl GltfMaterial
impl GltfMaterial
Trait Implementations§
Source§impl Clone for GltfMaterial
impl Clone for GltfMaterial
Source§fn clone(&self) -> GltfMaterial
fn clone(&self) -> GltfMaterial
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 moreSource§impl Debug for GltfMaterial
impl Debug for GltfMaterial
Auto Trait Implementations§
impl Freeze for GltfMaterial
impl RefUnwindSafe for GltfMaterial
impl Send for GltfMaterial
impl Sync for GltfMaterial
impl Unpin for GltfMaterial
impl UnsafeUnpin for GltfMaterial
impl UnwindSafe for GltfMaterial
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.