#include <directlighting.h>
Public Member Functions | |
DirectLightingIntegrator (LightStrategy ls=SAMPLE_ALL_UNIFORM, int md=5) | |
~DirectLightingIntegrator () | |
Spectrum | Li (const Scene *scene, const Renderer *renderer, const RayDifferential &ray, const Intersection &isect, const Sample *sample, RNG &rng, MemoryArena &arena) const |
void | RequestSamples (Sampler *sampler, Sample *sample, const Scene *scene) |
Private Attributes | |
LightStrategy | strategy |
int | maxDepth |
LightSampleOffsets * | lightSampleOffsets |
BSDFSampleOffsets * | bsdfSampleOffsets |
int | lightNumOffset |
Definition at line 38 of file directlighting.h.
DirectLightingIntegrator::DirectLightingIntegrator | ( | LightStrategy | ls = SAMPLE_ALL_UNIFORM , |
|
int | md = 5 | |||
) |
Definition at line 32 of file directlighting.cpp.
References bsdfSampleOffsets, lightSampleOffsets, maxDepth, and strategy.
DirectLightingIntegrator::~DirectLightingIntegrator | ( | ) |
Definition at line 40 of file directlighting.cpp.
References bsdfSampleOffsets, and lightSampleOffsets.
Spectrum DirectLightingIntegrator::Li | ( | const Scene * | scene, | |
const Renderer * | renderer, | |||
const RayDifferential & | ray, | |||
const Intersection & | isect, | |||
const Sample * | sample, | |||
RNG & | rng, | |||
MemoryArena & | arena | |||
) | const [virtual] |
Implements SurfaceIntegrator.
Definition at line 73 of file directlighting.cpp.
References bsdfSampleOffsets, Ray::d, Ray::depth, BSDF::dgShading, Intersection::GetBSDF(), Intersection::Le(), lightNumOffset, Scene::lights, lightSampleOffsets, maxDepth, DifferentialGeometry::nn, DifferentialGeometry::p, Intersection::rayEpsilon, SAMPLE_ALL_UNIFORM, SAMPLE_ONE_UNIFORM, SpecularReflect(), SpecularTransmit(), strategy, Ray::time, UniformSampleAllLights(), and UniformSampleOneLight().
Referenced by MetropolisRenderer::Li().
void DirectLightingIntegrator::RequestSamples | ( | Sampler * | sampler, | |
Sample * | sample, | |||
const Scene * | scene | |||
) | [virtual] |
Reimplemented from Integrator.
Definition at line 46 of file directlighting.cpp.
References Sample::Add1D(), bsdfSampleOffsets, lightNumOffset, Scene::lights, lightSampleOffsets, Light::nSamples, Sampler::RoundSize(), SAMPLE_ALL_UNIFORM, and strategy.
Definition at line 54 of file directlighting.h.
Referenced by DirectLightingIntegrator(), Li(), RequestSamples(), and ~DirectLightingIntegrator().
int DirectLightingIntegrator::lightNumOffset [private] |
Definition at line 55 of file directlighting.h.
Referenced by Li(), and RequestSamples().
Definition at line 53 of file directlighting.h.
Referenced by DirectLightingIntegrator(), Li(), RequestSamples(), and ~DirectLightingIntegrator().
int DirectLightingIntegrator::maxDepth [private] |
Definition at line 50 of file directlighting.h.
Referenced by DirectLightingIntegrator(), and Li().
Definition at line 49 of file directlighting.h.
Referenced by DirectLightingIntegrator(), Li(), and RequestSamples().