Struct gltf::material::PbrSpecularGlossiness

source ·
pub struct PbrSpecularGlossiness<'a> { /* private fields */ }
Available on crate feature KHR_materials_pbrSpecularGlossiness only.
Expand description

A set of parameter values that are used to define the specular-glossiness material model from Physically-Based Rendering (PBR) methodology.

Implementations§

source§

impl<'a> PbrSpecularGlossiness<'a>

source

pub fn diffuse_factor(&self) -> [f32; 4]

Returns the material’s base color factor.

The default value is [1.0, 1.0, 1.0, 1.0].

source

pub fn diffuse_texture(&self) -> Option<Info<'a>>

Returns the base color texture.

source

pub fn specular_factor(&self) -> [f32; 3]

Returns the specular factor of the material.

The default value is [1.0, 1.0, 1.0].

source

pub fn glossiness_factor(&self) -> f32

Returns the glossiness factor of the material.

A value of 1.0 means the material has full glossiness or is perfectly smooth. A value of 0.0 means the material has no glossiness or is completely rough. This value is linear.

The default value is 1.0.

source

pub fn specular_glossiness_texture(&self) -> Option<Info<'a>>

The specular-glossiness texture.

A RGBA texture, containing the specular color of the material (RGB components) and its glossiness (A component). The color values are in sRGB space.

source

pub fn extras(&self) -> &'a Extras

Optional application specific data.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.