pub struct MaterialProperties<'a> { /* private fields */ }
Expand description

Proxy type to material properties.

Implementations§

source§

impl<'a> MaterialProperties<'a>

source

pub fn shading_model(&self) -> Result<Option<ShadingModel>, Error>

Returns shading model.

source

pub fn shading_model_or_default(&self) -> Result<ShadingModel, Error>

Returns shading model.

Returns default if the value is not set.

source

pub fn multi_layer(&self) -> Result<Option<bool>, Error>

Returns multi layer flag.

source

pub fn multi_layer_or_default(&self) -> Result<bool, Error>

Returns multi layer flag.

Returns default if the value is not set.

source

pub fn emissive_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns emissive color.

source

pub fn emissive_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns emissive color.

Returns default if the value is not set.

source

pub fn emissive_factor(&self) -> Result<Option<f64>, Error>

Returns emissive factor.

source

pub fn emissive_factor_or_default(&self) -> Result<f64, Error>

Returns emissive factor.

Returns default if the value is not set.

source

pub fn ambient_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns ambient color.

source

pub fn ambient_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns ambient color.

Returns default if the value is not set.

source

pub fn ambient_factor(&self) -> Result<Option<f64>, Error>

Returns ambient factor.

source

pub fn ambient_factor_or_default(&self) -> Result<f64, Error>

Returns ambient factor.

Returns default if the value is not set.

source

pub fn diffuse_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns diffuse color.

source

pub fn diffuse_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns diffuse color.

Returns default if the value is not set.

source

pub fn diffuse_factor(&self) -> Result<Option<f64>, Error>

Returns diffuse factor.

source

pub fn diffuse_factor_or_default(&self) -> Result<f64, Error>

Returns diffuse factor.

Returns default if the value is not set.

source

pub fn bump(&self) -> Result<Option<[f64; 3]>, Error>

Returns bump vector.

source

pub fn bump_or_default(&self) -> Result<[f64; 3], Error>

Returns bump vector.

Returns default if the value is not set.

source

pub fn bump_factor(&self) -> Result<Option<f64>, Error>

Returns bump factor.

source

pub fn bump_factor_or_default(&self) -> Result<f64, Error>

Returns bump factor.

Returns default if the value is not set.

source

pub fn normal_map(&self) -> Result<Option<[f64; 3]>, Error>

Returns normal map.

source

pub fn normal_map_or_default(&self) -> Result<[f64; 3], Error>

Returns normal map.

Returns default if the value is not set.

source

pub fn transparent_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns transparent color.

source

pub fn transparent_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns transparent color.

Returns default if the value is not set.

source

pub fn transparency_factor(&self) -> Result<Option<f64>, Error>

Returns transparency factor.

source

pub fn transparency_factor_or_default(&self) -> Result<f64, Error>

Returns transparency factor.

Returns default if the value is not set.

source

pub fn displacement_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns displacement color.

source

pub fn displacement_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns displacement color.

Returns default if the value is not set.

source

pub fn displacement_factor(&self) -> Result<Option<f64>, Error>

Returns displacement factor.

source

pub fn displacement_factor_or_default(&self) -> Result<f64, Error>

Returns displacement factor.

Returns default if the value is not set.

source

pub fn vector_displacement_color(&self) -> Result<Option<RGB<f64>>, Error>

Returns vector displacement color.

source

pub fn vector_displacement_color_or_default(&self) -> Result<RGB<f64>, Error>

Returns vector displacement color.

Returns default if the value is not set.

source

pub fn vector_displacement_factor(&self) -> Result<Option<f64>, Error>

Returns vector displacement factor.

source

pub fn vector_displacement_factor_or_default(&self) -> Result<f64, Error>

Returns vector displacement factor.

Returns default if the value is not set.

source

pub fn specular(&self) -> Result<Option<RGB<f64>>, Error>

Returns specular color.

source

pub fn specular_or_default(&self) -> Result<RGB<f64>, Error>

Returns specular color.

Returns default if the value is not set.

source

pub fn specular_factor(&self) -> Result<Option<f64>, Error>

Returns specular factor.

source

pub fn specular_factor_or_default(&self) -> Result<f64, Error>

Returns specular color.

Returns default if the value is not set.

source

pub fn shininess(&self) -> Result<Option<f64>, Error>

Returns shininess.

source

pub fn shininess_or_default(&self) -> Result<f64, Error>

Returns shininess.

Returns default if the value is not set.

source

pub fn reflection(&self) -> Result<Option<RGB<f64>>, Error>

Returns reflection color.

source

pub fn reflection_or_default(&self) -> Result<RGB<f64>, Error>

Returns reflection color.

Returns default if the value is not set.

source

pub fn reflection_factor(&self) -> Result<Option<f64>, Error>

Returns reflection factor.

source

pub fn reflection_factor_or_default(&self) -> Result<f64, Error>

Returns reflection color.

Returns default if the value is not set.

Methods from Deref<Target = ObjectProperties<'a>>§

source

pub fn get_property(&self, name: &str) -> Option<PropertyHandle<'a>>

Returns property handle if found.

Trait Implementations§

source§

impl<'a> Clone for MaterialProperties<'a>

source§

fn clone(&self) -> MaterialProperties<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for MaterialProperties<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Deref for MaterialProperties<'a>

§

type Target = ObjectProperties<'a>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'a> Copy for MaterialProperties<'a>

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.