#include <projection.h>
Public Member Functions | |
| ProjectionLight (const Transform &light2world, const boost::shared_ptr< Texture< SWCSpectrum > > L, float gain, const string &texname, float fov) | |
| virtual | ~ProjectionLight () |
| virtual bool | IsDeltaLight () const |
| virtual bool | IsEnvironmental () const |
| RGBColor | Projection (const Vector &w) const |
| virtual SWCSpectrum | Power (const TsPack *tspack, const Scene *) const |
| virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Point &P, float u1, float u2, float u3, Vector *wo, float *pdf, VisibilityTester *visibility) const |
| virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const |
| virtual float | Pdf (const Point &, const Vector &) const |
| virtual float | Pdf (const Point &p, const Normal &n, const Point &po, const Normal &ns) const |
Static Public Member Functions | |
| static Light * | CreateLight (const Transform &light2world, const ParamSet ¶mSet, const TextureParams &tp) |
Private Attributes | |
| MIPMap< RGBColor > * | projectionMap |
| Point | lightPos |
| boost::shared_ptr< Texture < SWCSpectrum > > | Lbase |
| DifferentialGeometry | dummydg |
| float | gain |
| 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 boost::shared_ptr< Texture< SWCSpectrum > > | L, | |||
| float | gain, | |||
| const string & | texname, | |||
| float | fov | |||
| ) |
Definition at line 34 of file projection.cpp.
References cosTotalWidth, DEFAULT_EPSILON_STATIC, gain, hither, Lbase, lightPos, lightProjection, lux::Light::LightToWorld, lux::Perspective(), projectionMap, Radians(), lux::ReadImage(), screenX0, screenX1, screenY0, screenY1, and yon.
Referenced by CreateLight().
| ProjectionLight::~ProjectionLight | ( | ) | [virtual] |
Definition at line 72 of file projection.cpp.
References projectionMap.
| Light * ProjectionLight::CreateLight | ( | const Transform & | light2world, | |
| const ParamSet & | paramSet, | |||
| const TextureParams & | tp | |||
| ) | [static] |
Definition at line 110 of file projection.cpp.
References lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneString(), blender::g, lux::TextureParams::GetSWCSpectrumTexture(), and ProjectionLight().
| virtual bool lux::ProjectionLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 40 of file projection.h.
| virtual bool lux::ProjectionLight::IsEnvironmental | ( | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 41 of file projection.h.
| float ProjectionLight::Pdf | ( | const Point & | p, | |
| const Normal & | n, | |||
| const Point & | po, | |||
| const Normal & | ns | |||
| ) | const [virtual] |
Implements lux::Light.
Definition at line 105 of file projection.cpp.
Implements lux::Light.
Definition at line 102 of file projection.cpp.
| virtual SWCSpectrum lux::ProjectionLight::Power | ( | const TsPack * | tspack, | |
| const Scene * | ||||
| ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 43 of file projection.h.
References cosTotalWidth, dummydg, Lbase, lux::MIPMap< T >::Lookup(), M_PI, and projectionMap.
Definition at line 73 of file projection.cpp.
References hither, lightProjection, lux::MIPMap< T >::Lookup(), 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 TsPack * | tspack, | |
| const Scene * | scene, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| float | u4, | |||
| Ray * | ray, | |||
| float * | ||||
| ) | const [virtual] |
Implements lux::Light.
Definition at line 94 of file projection.cpp.
References cosTotalWidth, lux::Ray::d, dummydg, gain, Lbase, lightPos, lux::Light::LightToWorld, lux::Ray::o, Projection(), lux::UniformConePdf(), and lux::UniformSampleCone().
| SWCSpectrum ProjectionLight::Sample_L | ( | const TsPack * | tspack, | |
| const Point & | P, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| Vector * | wo, | |||
| float * | pdf, | |||
| VisibilityTester * | visibility | |||
| ) | const [virtual] |
Implements lux::Light.
Definition at line 86 of file projection.cpp.
References lux::DistanceSquared(), dummydg, gain, Lbase, lightPos, lux::Normalize(), Projection(), lux::VisibilityTester::SetSegment(), and lux::TsPack::time.
float lux::ProjectionLight::cosTotalWidth [private] |
Definition at line 68 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
Definition at line 63 of file projection.h.
Referenced by Power(), and Sample_L().
float lux::ProjectionLight::gain [private] |
Definition at line 64 of file projection.h.
Referenced by ProjectionLight(), and Sample_L().
float lux::ProjectionLight::hither [private] |
Definition at line 66 of file projection.h.
Referenced by Projection(), and ProjectionLight().
boost::shared_ptr< Texture<SWCSpectrum> > lux::ProjectionLight::Lbase [private] |
Definition at line 62 of file projection.h.
Referenced by Power(), ProjectionLight(), and Sample_L().
Point lux::ProjectionLight::lightPos [private] |
Definition at line 61 of file projection.h.
Referenced by ProjectionLight(), and Sample_L().
Definition at line 65 of file projection.h.
Referenced by Projection(), and ProjectionLight().
MIPMap<RGBColor>* lux::ProjectionLight::projectionMap [private] |
Definition at line 60 of file projection.h.
Referenced by Power(), Projection(), ProjectionLight(), and ~ProjectionLight().
float lux::ProjectionLight::screenX0 [private] |
Definition at line 67 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float lux::ProjectionLight::screenX1 [private] |
Definition at line 67 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float lux::ProjectionLight::screenY0 [private] |
Definition at line 67 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float lux::ProjectionLight::screenY1 [private] |
Definition at line 67 of file projection.h.
Referenced by Projection(), and ProjectionLight().
float lux::ProjectionLight::yon [private] |
Definition at line 66 of file projection.h.
Referenced by ProjectionLight().
1.6.2-20100208