Struct kgltf::Material[][src]

pub struct Material {
    pub name: Option<String>,
    pub extensions: Option<Extension>,
    pub pbr_metallic_roughness: Option<MaterialPbrMetallicRoughness>,
    pub normal_texture: Option<MaterialNormalTextureInfo>,
    pub occlusion_texture: Option<MaterialOcclusionTextureInfo>,
    pub emissive_texture: Option<TextureInfo>,
    pub emissive_factor: Option<[f32; 3]>,
    pub alpha_mode: Option<MaterialAlphaMode>,
    pub alpha_cutoff: Option<f32>,
    pub double_sided: Option<bool>,
}

The material appearance of a primitive.

Fields

name: Option<String>

The user-defined name of this object.

extensions: Option<Extension>

Dictionary object with extension-specific objects.

pbr_metallic_roughness: Option<MaterialPbrMetallicRoughness>

A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of pbrMetallicRoughness apply.

normal_texture: Option<MaterialNormalTextureInfo>

The normal map texture.

occlusion_texture: Option<MaterialOcclusionTextureInfo>

The occlusion map texture.

emissive_texture: Option<TextureInfo>

The emissive map texture.

emissive_factor: Option<[f32; 3]>

The emissive color of the material.

alpha_mode: Option<MaterialAlphaMode>

The alpha rendering mode of the material.

alpha_cutoff: Option<f32>

The alpha cutoff value of the material.

double_sided: Option<bool>

Specifies whether the material is double sided.

Trait Implementations

impl Clone for Material[src]

impl Debug for Material[src]

impl<'a> Deserialize<'a> for Material[src]

impl Serialize for Material[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<'a, T> FromJson<'a> for T where
    T: Deserialize<'a>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToJson for T where
    T: Serialize
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.