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

pub struct SpatialLightDistribution {
    pub scene: Scene,
    pub n_voxels: [i32; 3],
    pub hash_table_size: usize,
    // some fields omitted

A spatially-varying light distribution that adjusts the probability of sampling a light source based on an estimate of its contribution to a region of space. A fixed voxel grid is imposed over the scene bounds and a sampling distribution is computed as needed for each voxel.


scene: Scenen_voxels: [i32; 3]hash_table_size: usize


impl SpatialLightDistribution[src]

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

pub fn compute_distribution(&self, pi: &Point3i) -> Distribution1D[src]

Compute the sampling distribution for the voxel with integer coordiantes given by "pi".

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 SpatialLightDistribution

impl Send for SpatialLightDistribution

impl Sync for SpatialLightDistribution

impl Unpin for SpatialLightDistribution

impl !UnwindSafe for SpatialLightDistribution

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.