Arty
|
Base class for all lights. More...
#include <lights.h>
Public Member Functions | |
virtual DirectLightingSample | sample_direct (const float3 &from, Sampler &sampler) const =0 |
Samples direct illumination from this light source at the given point on a surface. | |
virtual EmissionSample | sample_emission (Sampler &sampler) const =0 |
Samples the emitting surface of the light. | |
virtual EmissionValue | emission (const float3 &dir, float u, float v) const =0 |
Returns the emission of a light source (only for light sources with an area). | |
virtual bool | has_area () const =0 |
Returns true if the light has an area (i.e. can be hit by a ray). | |
Protected Member Functions | |
EmissionSample | make_emission_sample (const float3 &pos, const float3 &dir, const rgb &intensity, float pdf_area, float pdf_dir, float cos) const |
DirectLightingSample | make_direct_sample (const float3 &pos, const rgb &intensity, float pdf_area, float pdf_dir, float cos) const |
Base class for all lights.