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
sourceimpl 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
sourceimpl Clone for MicrofacetTransmission
impl Clone for MicrofacetTransmission
sourcefn clone(&self) -> MicrofacetTransmission
fn clone(&self) -> MicrofacetTransmission
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl 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
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