[−][src]Trait pbrt::core::light::Light
Required Methods
fn sample_li(
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
Returns the radiance arriving at a point at a certain time due to the light, assuming there are no occluding objects between them.
fn power(&self) -> Spectrum
fn preprocess(&self, scene: &Scene)
fn le(&self, _ray: &mut Ray) -> Spectrum
fn pdf_li(&self, iref: &dyn Interaction, wi: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
&self,
u1: &Point2f,
u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn pdf_le(
&self,
ray: &Ray,
n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
&self,
ray: &Ray,
n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
Implementors
impl Light for DiffuseAreaLight
[src]
impl Light for DiffuseAreaLight
fn sample_li(
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
[src]
fn sample_li(
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
fn power(&self) -> Spectrum
[src]
fn power(&self) -> Spectrum
fn preprocess(&self, _scene: &Scene)
[src]
fn preprocess(&self, _scene: &Scene)
fn le(&self, _ray: &mut Ray) -> Spectrum
[src]
fn le(&self, _ray: &mut Ray) -> Spectrum
fn pdf_li(&self, iref: &dyn Interaction, wi: Vector3f) -> Float
[src]
fn pdf_li(&self, iref: &dyn Interaction, wi: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
u2: &Point2f,
_time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
[src]
fn sample_le(
&self,
u1: &Point2f,
u2: &Point2f,
_time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn pdf_le(
&self,
ray: &Ray,
n: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
[src]
fn pdf_le(
&self,
ray: &Ray,
n: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
fn get_flags(&self) -> u8
[src]
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
[src]
fn get_n_samples(&self) -> i32
impl Light for DistantLight
[src]
impl Light for DistantLight
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
[src]
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
fn power(&self) -> Spectrum
[src]
fn power(&self) -> Spectrum
fn preprocess(&self, scene: &Scene)
[src]
fn preprocess(&self, scene: &Scene)
Some of the DistanceLight methods need to know the bounds of the scene. Because lights are created before the scene geometry, these bounds aren't available when the DistanceLight constructor runs. Therefore, DistanceLight implements the optional preprocess() method to get the bound. This method is called at the end of the Scene constructor.
fn le(&self, _ray: &mut Ray) -> Spectrum
[src]
fn le(&self, _ray: &mut Ray) -> Spectrum
Default implementation returns no emitted radiance for a ray that escapes the scene bounds.
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
[src]
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
[src]
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn pdf_le(
&self,
_ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
[src]
fn pdf_le(
&self,
_ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
fn get_flags(&self) -> u8
[src]
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
[src]
fn get_n_samples(&self) -> i32
impl Light for InfiniteAreaLight
[src]
impl Light for InfiniteAreaLight
fn sample_li(
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
[src]
fn sample_li(
&self,
iref: &InteractionCommon,
u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
fn power(&self) -> Spectrum
[src]
fn power(&self) -> Spectrum
Like directional lights, the total power from the infinite area light is related to the surface area of the scene. Like many other lights the power computed here is approximate.
fn preprocess(&self, scene: &Scene)
[src]
fn preprocess(&self, scene: &Scene)
Like DistanceLights, InfiniteAreaLights also need the scene bounds; here again, the preprocess() method finds the scene bounds after all of the scene geometry has been created.
fn le(&self, ray: &mut Ray) -> Spectrum
[src]
fn le(&self, ray: &mut Ray) -> Spectrum
Because infinte area lights need to be able to contribute radiance to rays that don't hit any geometry in the scene, we'll add a method to the base Light class that returns emitted radiance due to that light along a ray that escapes the scene bounds. It's the responsibility of the integrators to call this method for these rays.
fn pdf_li(&self, _iref: &dyn Interaction, w: Vector3f) -> Float
[src]
fn pdf_li(&self, _iref: &dyn Interaction, w: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
[src]
fn sample_le(
&self,
u1: &Point2f,
u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn pdf_le(
&self,
ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
[src]
fn pdf_le(
&self,
ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
fn get_flags(&self) -> u8
[src]
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
[src]
fn get_n_samples(&self) -> i32
impl Light for PointLight
[src]
impl Light for PointLight
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
[src]
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
fn power(&self) -> Spectrum
[src]
fn power(&self) -> Spectrum
fn preprocess(&self, _scene: &Scene)
[src]
fn preprocess(&self, _scene: &Scene)
fn le(&self, _ray: &mut Ray) -> Spectrum
[src]
fn le(&self, _ray: &mut Ray) -> Spectrum
Default implementation returns no emitted radiance for a ray that escapes the scene bounds.
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
[src]
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
[src]
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn get_flags(&self) -> u8
[src]
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
[src]
fn get_n_samples(&self) -> i32
fn pdf_le(
&self,
_ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
[src]
fn pdf_le(
&self,
_ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
impl Light for SpotLight
[src]
impl Light for SpotLight
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
[src]
fn sample_li(
&self,
iref: &InteractionCommon,
_u: &Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester
) -> Spectrum
fn power(&self) -> Spectrum
[src]
fn power(&self) -> Spectrum
fn preprocess(&self, _scene: &Scene)
[src]
fn preprocess(&self, _scene: &Scene)
fn le(&self, _ray: &mut Ray) -> Spectrum
[src]
fn le(&self, _ray: &mut Ray) -> Spectrum
Default implementation returns no emitted radiance for a ray that escapes the scene bounds.
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
[src]
fn pdf_li(&self, _iref: &dyn Interaction, _wi: Vector3f) -> Float
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
[src]
fn sample_le(
&self,
u1: &Point2f,
_u2: &Point2f,
time: Float,
ray: &mut Ray,
n_light: &mut Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
) -> Spectrum
fn get_flags(&self) -> u8
[src]
fn get_flags(&self) -> u8
fn get_n_samples(&self) -> i32
[src]
fn get_n_samples(&self) -> i32
fn pdf_le(
&self,
ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
[src]
fn pdf_le(
&self,
ray: &Ray,
_n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)