#include <projection.h>
Public Member Functions | |
ProjectionLight (const Transform &light2world, const Spectrum &intensity, const string &texname, float fov) | |
~ProjectionLight () | |
Spectrum | Sample_L (const Point &p, float pEpsilon, const LightSample &ls, float time, Vector *wi, float *pdf, VisibilityTester *vis) const |
bool | IsDeltaLight () const |
Spectrum | Projection (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 | |
MIPMap< RGBSpectrum > * | projectionMap |
Point | lightPos |
Spectrum | Intensity |
Transform | lightProjection |
float | hither |
float | yon |
float | screenX0 |
float | screenX1 |
float | screenY0 |
float | screenY1 |
float | cosTotalWidth |
Definition at line 38 of file projection.h.
ProjectionLight::ProjectionLight | ( | const Transform & | light2world, | |
const Spectrum & | intensity, | |||
const string & | texname, | |||
float | fov | |||
) |
Definition at line 33 of file projection.cpp.
References cosTotalWidth, hither, Intensity, lightPos, lightProjection, Light::LightToWorld, Perspective(), projectionMap, Radians(), ReadImage(), screenX0, screenX1, screenY0, screenY1, and yon.
ProjectionLight::~ProjectionLight | ( | ) |
Definition at line 69 of file projection.cpp.
References projectionMap.
bool ProjectionLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements Light.
Definition at line 46 of file projection.h.
Implements Light.
Definition at line 124 of file projection.cpp.
Implements Light.
Definition at line 97 of file projection.cpp.
References cosTotalWidth, Intensity, MIPMap< T >::Lookup(), M_PI, projectionMap, and SPECTRUM_ILLUMINANT.
Definition at line 81 of file projection.cpp.
References hither, lightProjection, MIPMap< T >::Lookup(), projectionMap, screenX0, screenX1, screenY0, screenY1, SPECTRUM_ILLUMINANT, Light::WorldToLight, Point::x, Vector::x, Point::y, Vector::y, and Vector::z.
Referenced by Sample_L().
Spectrum ProjectionLight::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 114 of file projection.cpp.
References cosTotalWidth, Ray::d, INFINITY, Intensity, lightPos, Light::LightToWorld, Projection(), UniformConePdf(), UniformSampleCone(), and LightSample::uPos.
Spectrum ProjectionLight::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 70 of file projection.cpp.
References DistanceSquared(), Intensity, lightPos, Normalize(), Projection(), and VisibilityTester::SetSegment().
float ProjectionLight::cosTotalWidth [private] |
Definition at line 60 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
float ProjectionLight::hither [private] |
Definition at line 58 of file projection.h.
Referenced by Projection(), and ProjectionLight().
Spectrum ProjectionLight::Intensity [private] |
Definition at line 56 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
Point ProjectionLight::lightPos [private] |
Definition at line 55 of file projection.h.
Referenced by ProjectionLight(), and Sample_L().
Transform ProjectionLight::lightProjection [private] |
Definition at line 57 of file projection.h.
Referenced by Projection(), and ProjectionLight().
MIPMap<RGBSpectrum>* ProjectionLight::projectionMap [private] |
Definition at line 54 of file projection.h.
Referenced by Power(), Projection(), ProjectionLight(), and ~ProjectionLight().
float ProjectionLight::screenX0 [private] |
Definition at line 59 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float ProjectionLight::screenX1 [private] |
Definition at line 59 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float ProjectionLight::screenY0 [private] |
Definition at line 59 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float ProjectionLight::screenY1 [private] |
Definition at line 59 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float ProjectionLight::yon [private] |
Definition at line 58 of file projection.h.
Referenced by ProjectionLight().