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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more