pub struct UniformLightDistribution {
    pub distrib: Arc<Distribution1D>,
}
Expand description

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.)

Fields

distrib: Arc<Distribution1D>

Implementations

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.