#include <directlighting.h>
Public Types | |
enum | LightStrategy { SAMPLE_ALL_UNIFORM, SAMPLE_ONE_UNIFORM, SAMPLE_AUTOMATIC } |
Public Member Functions | |
DirectLighting (LightStrategy ls, int md) | |
~DirectLighting () | |
SWCSpectrum | Li (const Scene *scene, const RayDifferential &ray, const Sample *sample, float *alpha) const |
void | RequestSamples (Sample *sample, const Scene *scene) |
Static Public Member Functions | |
static SurfaceIntegrator * | CreateSurfaceIntegrator (const ParamSet ¶ms) |
Private Member Functions | |
SWCSpectrum | LiInternal (const Scene *scene, const RayDifferential &ray, const Sample *sample, float *alpha, int rayDepth) const |
Private Attributes | |
LightStrategy | lightStrategy |
int | maxDepth |
int | sampleOffset |
Definition at line 34 of file directlighting.h.
Definition at line 37 of file directlighting.h.
DirectLighting::DirectLighting | ( | LightStrategy | ls, | |
int | md | |||
) |
Definition at line 31 of file directlighting.cpp.
References lightStrategy, and maxDepth.
Referenced by CreateSurfaceIntegrator().
lux::DirectLighting::~DirectLighting | ( | ) | [inline] |
Definition at line 43 of file directlighting.h.
SurfaceIntegrator * DirectLighting::CreateSurfaceIntegrator | ( | const ParamSet & | params | ) | [static] |
Definition at line 193 of file directlighting.cpp.
References DirectLighting(), lux::ParamSet::FindOneInt(), lux::ParamSet::FindOneString(), LUX_BADTOKEN, LUX_WARNING, luxError, maxDepth, SAMPLE_ALL_UNIFORM, SAMPLE_AUTOMATIC, and SAMPLE_ONE_UNIFORM.
SWCSpectrum DirectLighting::Li | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
float * | alpha | |||
) | const [virtual] |
Implements lux::Integrator.
Definition at line 181 of file directlighting.cpp.
References lux::Sample::AddContribution(), lux::Sample::imageX, lux::Sample::imageY, LiInternal(), and lux::Sample::sampler.
SWCSpectrum DirectLighting::LiInternal | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
float * | alpha, | |||
int | rayDepth | |||
) | const [private] |
Definition at line 61 of file directlighting.cpp.
References lux::AbsDot(), lux::SWCSpectrum::Black(), lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, lux::Ray::d, lux::Intersection::dg, lux::BSDF::dgShading, lux::DifferentialGeometry::dndu, lux::DifferentialGeometry::dndv, lux::Dot(), lux::DifferentialGeometry::dpdx, lux::DifferentialGeometry::dpdy, lux::DifferentialGeometry::dudx, lux::DifferentialGeometry::dudy, lux::DifferentialGeometry::dvdx, lux::DifferentialGeometry::dvdy, lux::BSDF::eta, lux::Intersection::GetBSDF(), lux::Sampler::GetLazyValues(), lux::RayDifferential::hasDifferentials, lux::Scene::Intersect(), lux::Intersection::Le(), lux::Integrator::Li(), lux::Scene::lights, lightStrategy, maxDepth, lux::DifferentialGeometry::nn, lux::Ray::o, lux::DifferentialGeometry::p, blender::p, lux::RayDifferential::rx, lux::RayDifferential::ry, SAMPLE_ALL_UNIFORM, lux::BSDF::Sample_f(), SAMPLE_ONE_UNIFORM, sampleOffset, lux::Sample::sampler, lux::VolumeIntegrator::Transmittance(), lux::UniformSampleAllLights(), lux::UniformSampleOneLight(), and lux::Scene::volumeIntegrator.
Referenced by Li().
Reimplemented from lux::Integrator.
Definition at line 36 of file directlighting.cpp.
References lux::Sample::AddxD(), lux::Scene::lights, lightStrategy, maxDepth, SAMPLE_ALL_UNIFORM, SAMPLE_AUTOMATIC, SAMPLE_ONE_UNIFORM, and sampleOffset.
Definition at line 56 of file directlighting.h.
Referenced by DirectLighting(), LiInternal(), and RequestSamples().
int lux::DirectLighting::maxDepth [private] |
Definition at line 58 of file directlighting.h.
Referenced by CreateSurfaceIntegrator(), DirectLighting(), LiInternal(), and RequestSamples().
int lux::DirectLighting::sampleOffset [private] |
Definition at line 60 of file directlighting.h.
Referenced by LiInternal(), and RequestSamples().