#include <spot.h>
Public Member Functions | |
SpotLight (const Transform &light2world, const Spectrum &, float gain, float width, float fall) | |
~SpotLight () | |
SWCSpectrum | Sample_L (const Point &p, Vector *wi, VisibilityTester *vis) const |
bool | IsDeltaLight () const |
float | Falloff (const Vector &w) const |
SWCSpectrum | Power (const Scene *) const |
SWCSpectrum | Sample_L (const Point &P, float u1, float u2, float u3, Vector *wo, float *pdf, VisibilityTester *visibility) const |
SWCSpectrum | 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 |
Static Public Member Functions | |
static Light * | CreateLight (const Transform &light2world, const ParamSet ¶mSet) |
Private Attributes | |
float | cosTotalWidth |
float | cosFalloffStart |
Point | lightPos |
SPD * | LSPD |
Definition at line 32 of file spot.h.
SpotLight::SpotLight | ( | const Transform & | light2world, | |
const Spectrum & | intensity, | |||
float | gain, | |||
float | width, | |||
float | fall | |||
) |
Definition at line 31 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, lightPos, lux::Light::LightToWorld, LSPD, Radians(), and lux::SPD::Scale().
Referenced by CreateLight().
Light * SpotLight::CreateLight | ( | const Transform & | light2world, | |
const ParamSet & | paramSet | |||
) | [static] |
Definition at line 79 of file spot.cpp.
References lux::CoordinateSystem(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOnePoint(), lux::ParamSet::FindOneSpectrum(), blender::g, lux::Transform::GetInverse(), lux::Normalize(), SpotLight(), lux::Translate(), lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, and lux::Vector::z.
Referenced by lux::MakeLight().
float SpotLight::Falloff | ( | const Vector & | w | ) | const |
Definition at line 50 of file spot.cpp.
References cosFalloffStart, cosTotalWidth, lux::Normalize(), lux::Light::WorldToLight, and lux::Vector::z.
Referenced by Sample_L().
bool lux::SpotLight::IsDeltaLight | ( | ) | const [inline, virtual] |
SWCSpectrum lux::SpotLight::Power | ( | const Scene * | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 40 of file spot.h.
References cosFalloffStart, cosTotalWidth, LSPD, and M_PI.
SWCSpectrum SpotLight::Sample_L | ( | const Scene * | scene, | |
float | u1, | |||
float | u2, | |||
float | u3, | |||
float | u4, | |||
Ray * | ray, | |||
float * | ||||
) | const [virtual] |
Implements lux::Light.
Definition at line 70 of file spot.cpp.
References cosTotalWidth, lux::Ray::d, Falloff(), lightPos, lux::Light::LightToWorld, LSPD, lux::Ray::o, lux::UniformConePdf(), and lux::UniformSampleCone().
SWCSpectrum SpotLight::Sample_L | ( | const Point & | P, | |
float | u1, | |||
float | u2, | |||
float | u3, | |||
Vector * | wo, | |||
float * | pdf, | |||
VisibilityTester * | visibility | |||
) | const [virtual] |
SWCSpectrum SpotLight::Sample_L | ( | const Point & | p, | |
Vector * | wi, | |||
VisibilityTester * | vis | |||
) | const [virtual] |
Implements lux::Light.
Definition at line 43 of file spot.cpp.
References lux::DistanceSquared(), Falloff(), lightPos, LSPD, lux::Normalize(), and lux::VisibilityTester::SetSegment().
Referenced by Sample_L().
float lux::SpotLight::cosFalloffStart [private] |
float lux::SpotLight::cosTotalWidth [private] |
Definition at line 54 of file spot.h.
Referenced by Falloff(), Power(), Sample_L(), and SpotLight().
Point lux::SpotLight::lightPos [private] |
SPD* lux::SpotLight::LSPD [private] |
Definition at line 56 of file spot.h.
Referenced by Power(), Sample_L(), SpotLight(), and ~SpotLight().