#include <diffuse.h>
Public Member Functions | |
DiffuseAreaLight (const Transform &light2world, const Spectrum &Le, int ns, const Reference< Shape > &shape) | |
~DiffuseAreaLight () | |
Spectrum | L (const Point &p, const Normal &n, const Vector &w) const |
Spectrum | Power (const Scene *) const |
bool | IsDeltaLight () const |
float | Pdf (const Point &, const Vector &) const |
Spectrum | Sample_L (const Point &P, float pEpsilon, const LightSample &ls, float time, Vector *wo, float *pdf, VisibilityTester *visibility) const |
Spectrum | Sample_L (const Scene *scene, const LightSample &ls, float u1, float u2, float time, Ray *ray, Normal *Ns, float *pdf) const |
Protected Attributes | |
Spectrum | Lemit |
ShapeSet * | shapeSet |
float | area |
Definition at line 37 of file diffuse.h.
DiffuseAreaLight::DiffuseAreaLight | ( | const Transform & | light2world, | |
const Spectrum & | Le, | |||
int | ns, | |||
const Reference< Shape > & | shape | |||
) |
Definition at line 37 of file diffuse.cpp.
References ShapeSet::Area(), area, Lemit, and shapeSet.
DiffuseAreaLight::~DiffuseAreaLight | ( | ) |
Definition at line 32 of file diffuse.cpp.
References shapeSet.
bool DiffuseAreaLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements Light.
Definition at line 76 of file diffuse.cpp.
References ShapeSet::Pdf(), and shapeSet.
Spectrum DiffuseAreaLight::Sample_L | ( | const Scene * | scene, | |
const LightSample & | ls, | |||
float | u1, | |||
float | u2, | |||
float | time, | |||
Ray * | ray, | |||
Normal * | Ns, | |||
float * | ||||
) | const [virtual] |
Implements Light.
Definition at line 81 of file diffuse.cpp.
References Dot(), INFINITY, INV_TWOPI, L(), ShapeSet::Pdf(), ShapeSet::Sample(), shapeSet, and UniformSampleSphere().
Spectrum DiffuseAreaLight::Sample_L | ( | const Point & | P, | |
float | pEpsilon, | |||
const LightSample & | ls, | |||
float | time, | |||
Vector * | wo, | |||
float * | pdf, | |||
VisibilityTester * | visibility | |||
) | const [virtual] |
Implements Light.
Definition at line 61 of file diffuse.cpp.
References L(), Normalize(), ShapeSet::Pdf(), ShapeSet::Sample(), VisibilityTester::SetSegment(), and shapeSet.
float DiffuseAreaLight::area [protected] |
Definition at line 57 of file diffuse.h.
Referenced by DiffuseAreaLight(), and Power().
Spectrum DiffuseAreaLight::Lemit [protected] |
Definition at line 55 of file diffuse.h.
Referenced by DiffuseAreaLight(), L(), and Power().
ShapeSet* DiffuseAreaLight::shapeSet [protected] |
Definition at line 56 of file diffuse.h.
Referenced by DiffuseAreaLight(), Pdf(), Sample_L(), and ~DiffuseAreaLight().