#include <directlighting.h>
Public Types | |
enum | LightStrategy { SAMPLE_ALL_UNIFORM, SAMPLE_ONE_UNIFORM, SAMPLE_AUTOMATIC } |
Public Member Functions | |
DirectLightingIntegrator (LightStrategy ls, int md) | |
virtual | ~DirectLightingIntegrator () |
virtual int | Li (const TsPack *tspack, const Scene *scene, const Sample *sample) const |
virtual void | RequestSamples (Sample *sample, const Scene *scene) |
virtual void | Preprocess (const TsPack *tspack, const Scene *scene) |
Static Public Member Functions | |
static SurfaceIntegrator * | CreateSurfaceIntegrator (const ParamSet ¶ms) |
Private Member Functions | |
int | LiInternal (const TsPack *tspack, const Scene *scene, const RayDifferential &ray, const Sample *sample, vector< SWCSpectrum > &L, float *alpha, int rayDepth) const |
Private Attributes | |
LightStrategy | lightStrategy |
int | maxDepth |
int | sampleOffset |
int | bufferId |
Definition at line 33 of file directlighting.h.
Definition at line 36 of file directlighting.h.
DirectLightingIntegrator::DirectLightingIntegrator | ( | LightStrategy | ls, | |
int | md | |||
) |
Definition at line 33 of file directlighting.cpp.
References lightStrategy, and maxDepth.
Referenced by CreateSurfaceIntegrator().
virtual lux::DirectLightingIntegrator::~DirectLightingIntegrator | ( | ) | [inline, virtual] |
Definition at line 44 of file directlighting.h.
SurfaceIntegrator * DirectLightingIntegrator::CreateSurfaceIntegrator | ( | const ParamSet & | params | ) | [static] |
Definition at line 252 of file directlighting.cpp.
References DirectLightingIntegrator(), lux::ParamSet::FindOneInt(), lux::ParamSet::FindOneString(), LUX_BADTOKEN, LUX_WARNING, luxError, maxDepth, SAMPLE_ALL_UNIFORM, SAMPLE_AUTOMATIC, and SAMPLE_ONE_UNIFORM.
int DirectLightingIntegrator::Li | ( | const TsPack * | tspack, | |
const Scene * | scene, | |||
const Sample * | sample | |||
) | const [virtual] |
Implements lux::SurfaceIntegrator.
Definition at line 227 of file directlighting.cpp.
References lux::Sample::AddContribution(), bufferId, lux::TsPack::camera, lux::Camera::GenerateRay(), lux::RayDifferential::hasDifferentials, lux::Sample::imageX, lux::Sample::imageY, lux::Scene::lightGroups, LiInternal(), lux::RayDifferential::rx, and lux::RayDifferential::ry.
int DirectLightingIntegrator::LiInternal | ( | const TsPack * | tspack, | |
const Scene * | scene, | |||
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
vector< SWCSpectrum > & | L, | |||
float * | alpha, | |||
int | rayDepth | |||
) | const [private] |
Definition at line 64 of file directlighting.cpp.
References lux::AbsDot(), lux::Intersection::arealight, 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, blender::g, lux::Intersection::GetBSDF(), lux::Sampler::GetLazyValues(), lux::Light::group, lux::RayDifferential::hasDifferentials, lux::Scene::Intersect(), lux::Intersection::Le(), lux::VolumeIntegrator::Li(), lux::Scene::lightGroups, lux::Scene::lights, lightStrategy, maxDepth, lux::DifferentialGeometry::nn, lux::Ray::o, lux::DifferentialGeometry::p, p, lux::RayDifferential::rx, lux::RayDifferential::ry, SAMPLE_ALL_UNIFORM, lux::BSDF::Sample_f(), SAMPLE_ONE_UNIFORM, sampleOffset, lux::Sample::sampler, lux::Ray::time, cimg_library::cimg::time(), lux::VolumeIntegrator::Transmittance(), lux::UniformSampleOneLight(), and lux::Scene::volumeIntegrator.
Referenced by Li().
Reimplemented from lux::Integrator.
Definition at line 56 of file directlighting.cpp.
References lux::BUF_FRAMEBUFFER, lux::BUF_TYPE_PER_PIXEL, bufferId, lux::Scene::camera, lux::Camera::film, lux::Sampler::GetBufferType(), lux::Film::RequestBuffer(), and lux::Scene::sampler.
Reimplemented from lux::Integrator.
Definition at line 38 of file directlighting.cpp.
References lux::Sample::AddxD(), lux::Scene::lights, lightStrategy, maxDepth, SAMPLE_ALL_UNIFORM, SAMPLE_AUTOMATIC, SAMPLE_ONE_UNIFORM, and sampleOffset.
int lux::DirectLightingIntegrator::bufferId [private] |
Definition at line 62 of file directlighting.h.
Referenced by Li(), and Preprocess().
Definition at line 58 of file directlighting.h.
Referenced by DirectLightingIntegrator(), LiInternal(), and RequestSamples().
int lux::DirectLightingIntegrator::maxDepth [private] |
Definition at line 60 of file directlighting.h.
Referenced by CreateSurfaceIntegrator(), DirectLightingIntegrator(), LiInternal(), and RequestSamples().
Definition at line 62 of file directlighting.h.
Referenced by LiInternal(), and RequestSamples().