pub struct TextureParams<'a> {
pub geom_params: &'a ParamSet,
pub mat_params: &'a ParamSet,
pub f_tex: &'a HashMap<String, Arc<dyn Texture<Float>>>,
pub s_tex: &'a HashMap<String, Arc<dyn Texture<Spectrum>>>,
}
Fields§
§geom_params: &'a ParamSet
§mat_params: &'a ParamSet
§f_tex: &'a HashMap<String, Arc<dyn Texture<Float>>>
§s_tex: &'a HashMap<String, Arc<dyn Texture<Spectrum>>>
Implementations§
Source§impl<'a> TextureParams<'a>
impl<'a> TextureParams<'a>
pub fn new( geom_params: &'a ParamSet, mat_params: &'a ParamSet, f_tex: &'a HashMap<String, Arc<dyn Texture<Float>>>, s_tex: &'a HashMap<String, Arc<dyn Texture<Spectrum>>>, ) -> Self
pub fn get_float_texture_or_null( &self, key: &str, ) -> Option<Arc<dyn Texture<Float>>>
pub fn get_float_texture( &self, key: &str, value: Float, ) -> Arc<dyn Texture<Float>>
pub fn get_spectrum_texture_or_null( &self, key: &str, ) -> Option<Arc<dyn Texture<Spectrum>>>
pub fn get_spectrum_texture( &self, key: &str, value: &Spectrum, ) -> Arc<dyn Texture<Spectrum>>
pub fn find_float(&self, key: &str, value: Float) -> Float
pub fn find_int(&self, key: &str, value: i32) -> i32
pub fn find_bool(&self, key: &str, value: bool) -> bool
pub fn find_vector3f(&self, key: &str, value: &Vector3f) -> Vector3f
pub fn find_spectrum(&self, key: &str, value: &Spectrum) -> Spectrum
pub fn find_string(&self, key: &str, value: &str) -> String
pub fn find_filename(&self, key: &str, value: &str) -> String
Auto Trait Implementations§
impl<'a> Freeze for TextureParams<'a>
impl<'a> !RefUnwindSafe for TextureParams<'a>
impl<'a> !Send for TextureParams<'a>
impl<'a> !Sync for TextureParams<'a>
impl<'a> Unpin for TextureParams<'a>
impl<'a> !UnwindSafe for TextureParams<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more