Public Member Functions | |
SpotLight (const Transform &light2world, const Spectrum &, float width, float fall) | |
Spectrum | Sample_L (const Point &p, Vector *wi, VisibilityTester *vis) const |
bool | IsDeltaLight () const |
float | Falloff (const Vector &w) const |
Spectrum | Power (const Scene *) const |
Spectrum | Sample_L (const Point &P, float u1, float u2, Vector *wo, float *pdf, VisibilityTester *visibility) const |
Spectrum | Sample_L (const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const |
float | Pdf (const Point &, const Vector &) const |
Private Attributes | |
float | cosTotalWidth |
float | cosFalloffStart |
Point | lightPos |
Spectrum | Intensity |
Definition at line 29 of file spot.cpp.
SpotLight::SpotLight | ( | const Transform & | light2world, | |
const Spectrum & | intensity, | |||
float | width, | |||
float | fall | |||
) |
Definition at line 52 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Intensity, lightPos, Light::LightToWorld, and Radians().
Referenced by CreateLight().
Spectrum SpotLight::Sample_L | ( | const Point & | p, | |
Vector * | wi, | |||
VisibilityTester * | vis | |||
) | const [virtual] |
Implements Light.
Definition at line 60 of file spot.cpp.
References DistanceSquared(), Falloff(), Intensity, lightPos, Normalize(), and VisibilityTester::SetSegment().
Referenced by Sample_L().
bool SpotLight::IsDeltaLight | ( | ) | const [inline, virtual] |
float SpotLight::Falloff | ( | const Vector & | w | ) | const |
Definition at line 67 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Normalize(), Light::WorldToLight, and Vector::z.
Referenced by Sample_L().
Implements Light.
Definition at line 36 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, Intensity, and M_PI.
Spectrum SpotLight::Sample_L | ( | const Point & | P, | |
float | u1, | |||
float | u2, | |||
Vector * | wo, | |||
float * | pdf, | |||
VisibilityTester * | visibility | |||
) | const [virtual] |
Spectrum SpotLight::Sample_L | ( | const Scene * | scene, | |
float | u1, | |||
float | u2, | |||
float | u3, | |||
float | u4, | |||
Ray * | ray, | |||
float * | ||||
) | const [virtual] |
Implements Light.
Definition at line 87 of file spot.cpp.
References cosTotalWidth, Ray::d, Falloff(), Intensity, lightPos, Light::LightToWorld, Ray::o, UniformConePdf(), and UniformSampleCone().
float SpotLight::cosTotalWidth [private] |
Definition at line 47 of file spot.cpp.
Referenced by Falloff(), Power(), Sample_L(), and SpotLight().
float SpotLight::cosFalloffStart [private] |
Point SpotLight::lightPos [private] |
Spectrum SpotLight::Intensity [private] |