Struct rs_pbrt::core::reflection::Bsdf
source · pub struct Bsdf {
pub eta: Float,
pub ns: Normal3f,
pub ng: Normal3f,
pub ss: Vector3f,
pub ts: Vector3f,
pub bxdfs: Vec<Bxdf>,
}
Fields§
§eta: Float
§ns: Normal3f
shading normal
ng: Normal3f
geometric normal
ss: Vector3f
§ts: Vector3f
§bxdfs: Vec<Bxdf>
Implementations§
source§impl Bsdf
impl Bsdf
pub fn new(si: &SurfaceInteraction<'_>, eta: Float) -> Self
pub fn add(&mut self, b: Bxdf)
pub fn num_components(&self, flags: u8) -> u8
pub fn world_to_local(&self, v: &Vector3f) -> Vector3f
pub fn local_to_world(&self, v: &Vector3f) -> Vector3f
pub fn f(&self, wo_w: &Vector3f, wi_w: &Vector3f, flags: u8) -> Spectrum
sourcepub fn sample_f(
&self,
wo_world: &Vector3f,
wi_world: &mut Vector3f,
u: &Point2f,
pdf: &mut Float,
bsdf_flags: u8,
sampled_type: &mut u8
) -> Spectrum
pub fn sample_f( &self, wo_world: &Vector3f, wi_world: &mut Vector3f, u: &Point2f, pdf: &mut Float, bsdf_flags: u8, sampled_type: &mut u8 ) -> Spectrum
Calls the individual Bxdf::sample_f() methods to generate samples.
pub fn pdf( &self, wo_world: &Vector3f, wi_world: &Vector3f, bsdf_flags: u8 ) -> Float
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Bsdf
impl Send for Bsdf
impl Sync for Bsdf
impl Unpin for Bsdf
impl !UnwindSafe for Bsdf
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