#include <point.h>
Public Member Functions | |
PointLight (const Transform &light2world, const Spectrum &intensity) | |
Spectrum | Sample_L (const Point &p, float pEpsilon, const LightSample &ls, float time, Vector *wi, float *pdf, VisibilityTester *vis) const |
Spectrum | Power (const Scene *) const |
bool | IsDeltaLight () const |
Spectrum | Sample_L (const Scene *scene, const LightSample &ls, float u1, float u2, float time, Ray *ray, Normal *Ns, float *pdf) const |
float | Pdf (const Point &, const Vector &) const |
void | SHProject (const Point &p, float pEpsilon, int lmax, const Scene *scene, bool computeLightVisibility, float time, RNG &rng, Spectrum *coeffs) const |
Private Attributes | |
Point | lightPos |
Spectrum | Intensity |
Definition at line 37 of file point.h.
Definition at line 34 of file point.cpp.
References Intensity, lightPos, and Light::LightToWorld.
bool PointLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Spectrum PointLight::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 72 of file point.cpp.
References Ray::d, INFINITY, Intensity, lightPos, UniformSampleSphere(), UniformSpherePdf(), and LightSample::uPos.
Spectrum PointLight::Sample_L | ( | const Point & | p, | |
float | pEpsilon, | |||
const LightSample & | ls, | |||
float | time, | |||
Vector * | wi, | |||
float * | pdf, | |||
VisibilityTester * | vis | |||
) | const [virtual] |
Implements Light.
Definition at line 42 of file point.cpp.
References DistanceSquared(), Intensity, lightPos, Normalize(), and VisibilityTester::SetSegment().
void PointLight::SHProject | ( | const Point & | p, | |
float | pEpsilon, | |||
int | lmax, | |||
const Scene * | scene, | |||
bool | computeLightVisibility, | |||
float | time, | |||
RNG & | rng, | |||
Spectrum * | coeffs | |||
) | const [virtual] |
Reimplemented from Light.
Definition at line 83 of file point.cpp.
References ALLOCA, Distance(), DistanceSquared(), Intensity, Scene::IntersectP(), lightPos, Normalize(), SHEvaluate(), and SHTerms().
Spectrum PointLight::Intensity [private] |
Definition at line 53 of file point.h.
Referenced by PointLight(), Power(), Sample_L(), and SHProject().
Point PointLight::lightPos [private] |
Definition at line 52 of file point.h.
Referenced by PointLight(), Sample_L(), and SHProject().