#include <projection.h>
Public Member Functions | |
ProjectionLight (const Transform &light2world, const Spectrum &intensity, const string &texname, float fov) | |
~ProjectionLight () | |
SWCSpectrum | Sample_L (const Point &p, Vector *wi, VisibilityTester *vis) const |
bool | IsDeltaLight () const |
Spectrum | Projection (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 | |
MIPMap< Spectrum > * | projectionMap |
Point | lightPos |
Spectrum | Intensity |
Transform | lightProjection |
float | hither |
float | yon |
float | screenX0 |
float | screenX1 |
float | screenY0 |
float | screenY1 |
float | cosTotalWidth |
Definition at line 33 of file projection.h.
ProjectionLight::ProjectionLight | ( | const Transform & | light2world, | |
const Spectrum & | intensity, | |||
const string & | texname, | |||
float | fov | |||
) |
Definition at line 35 of file projection.cpp.
References cosTotalWidth, hither, Intensity, lightPos, lightProjection, lux::Light::LightToWorld, lux::Perspective(), projectionMap, Radians(), RAY_EPSILON, lux::ReadImage(), screenX0, screenX1, screenY0, screenY1, and yon.
Referenced by CreateLight().
ProjectionLight::~ProjectionLight | ( | ) |
Light * ProjectionLight::CreateLight | ( | const Transform & | light2world, | |
const ParamSet & | paramSet | |||
) | [static] |
Definition at line 110 of file projection.cpp.
References lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneSpectrum(), lux::ParamSet::FindOneString(), and ProjectionLight().
Referenced by lux::MakeLight().
bool lux::ProjectionLight::IsDeltaLight | ( | ) | const [inline, virtual] |
SWCSpectrum lux::ProjectionLight::Power | ( | const Scene * | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 42 of file projection.h.
References cosTotalWidth, Intensity, M_PI, and projectionMap.
Definition at line 78 of file projection.cpp.
References hither, lightProjection, projectionMap, screenX0, screenX1, screenY0, screenY1, lux::Light::WorldToLight, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, and lux::Vector::z.
Referenced by Sample_L().
SWCSpectrum ProjectionLight::Sample_L | ( | const Scene * | scene, | |
float | u1, | |||
float | u2, | |||
float | u3, | |||
float | u4, | |||
Ray * | ray, | |||
float * | ||||
) | const [virtual] |
Implements lux::Light.
Definition at line 99 of file projection.cpp.
References cosTotalWidth, lux::Ray::d, Intensity, lightPos, lux::Light::LightToWorld, lux::Ray::o, Projection(), lux::UniformConePdf(), and lux::UniformSampleCone().
SWCSpectrum ProjectionLight::Sample_L | ( | const Point & | P, | |
float | u1, | |||
float | u2, | |||
float | u3, | |||
Vector * | wo, | |||
float * | pdf, | |||
VisibilityTester * | visibility | |||
) | const [virtual] |
Implements lux::Light.
Definition at line 91 of file projection.cpp.
References lux::DistanceSquared(), Intensity, lightPos, lux::Normalize(), Projection(), and lux::VisibilityTester::SetSegment().
SWCSpectrum ProjectionLight::Sample_L | ( | const Point & | p, | |
Vector * | wi, | |||
VisibilityTester * | vis | |||
) | const [virtual] |
Implements lux::Light.
Definition at line 71 of file projection.cpp.
References lux::DistanceSquared(), Intensity, lightPos, lux::Normalize(), Projection(), and lux::VisibilityTester::SetSegment().
float lux::ProjectionLight::cosTotalWidth [private] |
Definition at line 62 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
float lux::ProjectionLight::hither [private] |
Spectrum lux::ProjectionLight::Intensity [private] |
Definition at line 58 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
Point lux::ProjectionLight::lightPos [private] |
MIPMap<Spectrum>* lux::ProjectionLight::projectionMap [private] |
Definition at line 56 of file projection.h.
Referenced by Power(), Projection(), ProjectionLight(), and ~ProjectionLight().
float lux::ProjectionLight::screenX0 [private] |
float lux::ProjectionLight::screenX1 [private] |
float lux::ProjectionLight::screenY0 [private] |
float lux::ProjectionLight::screenY1 [private] |
float lux::ProjectionLight::yon [private] |