pub struct TextureParams { /* private fields */ }
Expand description
TextureParams
represent values necessary to create a new Texture.
TODO(wathiede): currently only a stub, textures not implemented.
Implementations§
Source§impl TextureParams
impl TextureParams
Sourcepub 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
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
Create a new TextureParams
from the given set of parameters.
TODO(wathiede): currently only a stub, textures not implemented.
Sourcepub fn find_float(&self, name: &str, default: Float) -> Float
pub fn find_float(&self, name: &str, default: Float) -> Float
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.
Sourcepub fn find_spectrum(&self, name: &str, default: Spectrum) -> Spectrum
pub fn find_spectrum(&self, name: &str, default: Spectrum) -> Spectrum
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.