[][src]Struct pbrt::core::paramset::TextureParams

pub struct TextureParams { /* fields omitted */ }

TextureParams represent values necessary to create a new Texture. TODO(wathiede): currently only a stub, textures not implemented.

Methods

impl TextureParams[src]

pub fn new(
    geom_params: ParamSet,
    material_params: ParamSet,
    float_textures: HashMap<String, Arc<dyn Texture<Float>>>,
    specturm_textures: HashMap<String, Arc<dyn Texture<Spectrum>>>
) -> TextureParams
[src]

Create a new TextureParams from the given set of parameters. TODO(wathiede): currently only a stub, textures not implemented.

pub fn find_float(&self, name: &str, default: Float) -> Float[src]

find_float will return the first Float value with the given name in this TextureParams's geom_params set, if none is found, it will find the first Float value in the material_params set. If no value is found there, the provided default will be returned.

pub fn find_spectrum(&self, name: &str, default: Spectrum) -> Spectrum[src]

find_spectrum will return the first Spectrum value with the given name in this TextureParams's geom_params set, if none is found, it will find the first Spectrum value in the material_params set. If no value is found there, the provided default will be returned.

Trait Implementations

impl Default for TextureParams[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<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

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.