
Public Member Functions | |
| ProjectionLight (const Transform &light2world, const Spectrum &intensity, const string &texname, float fov) | |
| ~ProjectionLight () | |
| Spectrum | Sample_L (const Point &p, Vector *wi, VisibilityTester *vis) const |
| bool | IsDeltaLight () const |
| Spectrum | Projection (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 | |
| 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 30 of file projection.cpp.
| ProjectionLight::ProjectionLight | ( | const Transform & | light2world, | |
| const Spectrum & | intensity, | |||
| const string & | texname, | |||
| float | fov | |||
| ) |
Definition at line 60 of file projection.cpp.
References cosTotalWidth, hither, Intensity, lightPos, lightProjection, Light::LightToWorld, Perspective(), projectionMap, Radians(), RAY_EPSILON, ReadImage(), screenX0, screenX1, screenY0, screenY1, and yon.
Referenced by CreateLight().
| ProjectionLight::~ProjectionLight | ( | ) |
| Spectrum ProjectionLight::Sample_L | ( | const Point & | p, | |
| Vector * | wi, | |||
| VisibilityTester * | vis | |||
| ) | const [virtual] |
Implements Light.
Definition at line 94 of file projection.cpp.
References DistanceSquared(), Intensity, lightPos, Normalize(), Projection(), and VisibilityTester::SetSegment().
| bool ProjectionLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Definition at line 101 of file projection.cpp.
References hither, lightProjection, MIPMap< T >::Lookup(), projectionMap, screenX0, screenX1, screenY0, screenY1, Light::WorldToLight, Point::x, Vector::x, Point::y, Vector::y, and Vector::z.
Referenced by Sample_L().
Implements Light.
Definition at line 39 of file projection.cpp.
References cosTotalWidth, Intensity, MIPMap< T >::Lookup(), M_PI, and projectionMap.
| Spectrum ProjectionLight::Sample_L | ( | const Point & | P, | |
| float | u1, | |||
| float | u2, | |||
| Vector * | wo, | |||
| float * | pdf, | |||
| VisibilityTester * | visibility | |||
| ) | const [virtual] |
Implements Light.
Definition at line 114 of file projection.cpp.
References DistanceSquared(), Intensity, lightPos, Normalize(), Projection(), and VisibilityTester::SetSegment().
| Spectrum ProjectionLight::Sample_L | ( | const Scene * | scene, | |
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| float | u4, | |||
| Ray * | ray, | |||
| float * | ||||
| ) | const [virtual] |
Implements Light.
Definition at line 122 of file projection.cpp.
References cosTotalWidth, Ray::d, Intensity, lightPos, Light::LightToWorld, Ray::o, Projection(), UniformConePdf(), and UniformSampleCone().
MIPMap<Spectrum>* ProjectionLight::projectionMap [private] |
Definition at line 50 of file projection.cpp.
Referenced by Power(), Projection(), ProjectionLight(), and ~ProjectionLight().
Point ProjectionLight::lightPos [private] |
Spectrum ProjectionLight::Intensity [private] |
Definition at line 52 of file projection.cpp.
Referenced by Power(), ProjectionLight(), and Sample_L().
Transform ProjectionLight::lightProjection [private] |
float ProjectionLight::hither [private] |
float ProjectionLight::yon [private] |
float ProjectionLight::screenX0 [private] |
float ProjectionLight::screenX1 [private] |
float ProjectionLight::screenY0 [private] |
float ProjectionLight::screenY1 [private] |
float ProjectionLight::cosTotalWidth [private] |
Definition at line 56 of file projection.cpp.
Referenced by Power(), ProjectionLight(), and Sample_L().
1.5.6