#include <spot.h>
Public Member Functions | |
| SpotLight (const Transform &light2world, const Spectrum &, float width, float fall) | |
| Spectrum | Sample_L (const Point &p, float pEpsilon, const LightSample &ls, float time, Vector *wi, float *pdf, VisibilityTester *vis) const |
| bool | IsDeltaLight () const |
| float | Falloff (const Vector &w) const |
| Spectrum | Power (const Scene *) 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 |
Private Attributes | |
| Point | lightPos |
| Spectrum | Intensity |
| float | cosTotalWidth |
| float | cosFalloffStart |
Definition at line 37 of file spot.h.
| SpotLight::SpotLight | ( | const Transform & | light2world, | |
| const Spectrum & | intensity, | |||
| float | width, | |||
| float | fall | |||
| ) |
Definition at line 32 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Intensity, lightPos, Light::LightToWorld, and Radians().
| float SpotLight::Falloff | ( | const Vector & | w | ) | const |
Definition at line 52 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Normalize(), Light::WorldToLight, and Vector::z.
Referenced by Sample_L().
| bool SpotLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements Light.
Definition at line 64 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Intensity, and M_PI.
| Spectrum SpotLight::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 98 of file spot.cpp.
References cosTotalWidth, Ray::d, Falloff(), INFINITY, Intensity, lightPos, Light::LightToWorld, UniformConePdf(), UniformSampleCone(), and LightSample::uPos.
| Spectrum SpotLight::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 spot.cpp.
References DistanceSquared(), Falloff(), Intensity, lightPos, Normalize(), and VisibilityTester::SetSegment().
float SpotLight::cosFalloffStart [private] |
Definition at line 53 of file spot.h.
Referenced by Falloff(), Power(), and SpotLight().
float SpotLight::cosTotalWidth [private] |
Definition at line 53 of file spot.h.
Referenced by Falloff(), Power(), Sample_L(), and SpotLight().
Spectrum SpotLight::Intensity [private] |
Definition at line 52 of file spot.h.
Referenced by Power(), Sample_L(), and SpotLight().
Point SpotLight::lightPos [private] |
Definition at line 51 of file spot.h.
Referenced by Sample_L(), and SpotLight().
1.6.3