[][src]Struct pbrt::core::lightdistrib::UniformLightDistribution

pub struct UniformLightDistribution {
    pub distrib: Arc<Distribution1D>,

The simplest possible implementation of LightDistribution: this returns a uniform distribution over all light sources, ignoring the provided point. This approach works well for very simple scenes, but is quite ineffective for scenes with more than a handful of light sources. (This was the sampling method originally used for the PathIntegrator and the VolPathIntegrator in the printed book, though without the UniformLightDistribution class.)


distrib: Arc<Distribution1D>


impl UniformLightDistribution[src]

pub fn new(scene: &Scene) -> Self[src]

pub fn lookup(&self, _p: &Point3f) -> Arc<Distribution1D>[src]

Given a point |p| in space, this method returns a (hopefully effective) sampling distribution for light sources at that point.

Auto Trait Implementations

impl RefUnwindSafe for UniformLightDistribution

impl Send for UniformLightDistribution

impl Sync for UniformLightDistribution

impl Unpin for UniformLightDistribution

impl UnwindSafe for UniformLightDistribution

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.