core:: lightdistrib:: SpatialLightDistribution
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.
n_voxels: [i32; 3]
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
type Error = Infallible
The type returned in the event of a conversion error.