pub struct BSDF {
pub eta: Float,
pub ns: Normal3f,
pub ng: Normal3f,
pub ss: Vector3f,
pub ts: Vector3f,
pub bxdfs: Vec<Arc<dyn BxDF>>,
}
Fields§
§eta: Float
§ns: Normal3f
§ng: Normal3f
§ss: Vector3f
§ts: Vector3f
§bxdfs: Vec<Arc<dyn BxDF>>
Implementations§
Source§impl BSDF
impl BSDF
pub fn new(si: &SurfaceInteraction, eta: Float) -> Self
pub fn num_components(&self, t: BxDFType) -> i32
pub fn has_components(&self, t: BxDFType) -> bool
pub fn world_to_local(&self, v: &Vector3f) -> Vector3f
pub fn local_to_world(&self, v: &Vector3f) -> Vector3f
pub fn sample_f( &self, wo_w: &Vector3f, u: &Point2f, flags: BxDFType, ) -> Option<(Spectrum, Vector3f, Float, BxDFType)>
pub fn f(&self, wo_w: &Vector3f, wi_w: &Vector3f, flags: BxDFType) -> Spectrum
pub fn pdf(&self, wo_w: &Vector3f, wi_w: &Vector3f, flags: BxDFType) -> Float
pub fn add(&mut self, bxdf: &Arc<dyn BxDF>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BSDF
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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