Struct rs_pbrt::core::reflection::MicrofacetTransmission
source · pub struct MicrofacetTransmission {
pub t: Spectrum,
pub distribution: MicrofacetDistribution,
pub eta_a: Float,
pub eta_b: Float,
pub fresnel: FresnelDielectric,
pub mode: TransportMode,
pub sc_opt: Option<Spectrum>,
}
Fields§
§t: Spectrum
§distribution: MicrofacetDistribution
§eta_a: Float
§eta_b: Float
§fresnel: FresnelDielectric
§mode: TransportMode
§sc_opt: Option<Spectrum>
Implementations§
source§impl MicrofacetTransmission
impl MicrofacetTransmission
pub fn new( t: Spectrum, distribution: MicrofacetDistribution, eta_a: Float, eta_b: Float, mode: TransportMode, sc_opt: Option<Spectrum> ) -> Self
pub fn f(&self, wo: &Vector3f, wi: &Vector3f) -> Spectrum
pub fn get_type(&self) -> u8
sourcepub fn sample_f(
&self,
wo: &Vector3f,
wi: &mut Vector3f,
u: &Point2f,
pdf: &mut Float,
_sampled_type: &mut u8
) -> Spectrum
pub fn sample_f( &self, wo: &Vector3f, wi: &mut Vector3f, u: &Point2f, pdf: &mut Float, _sampled_type: &mut u8 ) -> Spectrum
Override sample_f() to use a better importance sampling method than weighted cosine based on the microface distribution
pub fn pdf(&self, wo: &Vector3f, wi: &Vector3f) -> Float
Trait Implementations§
source§impl Clone for MicrofacetTransmission
impl Clone for MicrofacetTransmission
source§fn clone(&self) -> MicrofacetTransmission
fn clone(&self) -> MicrofacetTransmission
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for MicrofacetTransmission
Auto Trait Implementations§
impl RefUnwindSafe for MicrofacetTransmission
impl Send for MicrofacetTransmission
impl Sync for MicrofacetTransmission
impl Unpin for MicrofacetTransmission
impl UnwindSafe for MicrofacetTransmission
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