pub struct GltfMaterial {
pub name: String,
pub normal_texture: Option<GltfTextureInfo>,
pub occlusion_texture: Option<GltfTextureInfo>,
pub emissive_texture: Option<GltfTextureInfo>,
pub pbr_metallic_roughness: Option<GltfPbrMetallicRoughness>,
pub emissive_factor: [f32; 3],
pub alpha_mode: Option<String>,
pub alpha_cutoff: f32,
pub double_sided: bool,
}Expand description
A type representing a Gltf Material -
Fields§
§name: StringOptional name of the material
normal_texture: Option<GltfTextureInfo>Image index (source)
occlusion_texture: Option<GltfTextureInfo>occlusion texture
emissive_texture: Option<GltfTextureInfo>emissive texture
pbr_metallic_roughness: Option<GltfPbrMetallicRoughness>pbrMetallicRoughness
emissive_factor: [f32; 3]Emissive factor
alpha_mode: Option<String>One of OPAQUE, MASK, BLEND
alpha_cutoff: f32§double_sided: boolImplementations§
Source§impl GltfMaterial
impl GltfMaterial
pub fn pbr_metallic_roughness(&self) -> &Option<GltfPbrMetallicRoughness>
pub fn normal_texture(&self) -> &Option<GltfTextureInfo>
pub fn occlusion_texture(&self) -> &Option<GltfTextureInfo>
pub fn emissive_texture(&self) -> &Option<GltfTextureInfo>
Trait Implementations§
Source§impl Debug for GltfMaterial
impl Debug for GltfMaterial
Source§impl Default for GltfMaterial
impl Default for GltfMaterial
Source§fn default() -> GltfMaterial
fn default() -> GltfMaterial
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GltfMaterialwhere
GltfMaterial: Default,
impl<'de> Deserialize<'de> for GltfMaterialwhere
GltfMaterial: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Named for GltfMaterial
impl Named 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 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