#include <point.h>
Public Member Functions | |
| PointLight (const Transform &light2world, const boost::shared_ptr< Texture< SWCSpectrum > > L, float gain, SampleableSphericalFunction *ssf) | |
| virtual | ~PointLight () |
| virtual bool | IsDeltaLight () const |
| virtual bool | IsEnvironmental () 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 |
| virtual bool | Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, BSDF **bsdf, float *pdf, SWCSpectrum *Le) const |
| virtual bool | Sample_L (const TsPack *tspack, const Scene *scene, const Point &p, const Normal &n, float u1, float u2, float u3, BSDF **bsdf, float *pdf, float *pdfDirect, VisibilityTester *visibility, SWCSpectrum *Le) const |
| virtual SWCSpectrum | Le (const TsPack *tspack, const Scene *scene, const Ray &r, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) const |
Static Public Member Functions | |
| static Light * | CreateLight (const Transform &light2world, const ParamSet ¶mSet, const TextureParams &tp) |
Private Member Functions | |
| SWCSpectrum | L (const TsPack *tspack, const Vector &w) const |
Private Attributes | |
| Point | lightPos |
| bool | flipZ |
| boost::shared_ptr< Texture < SWCSpectrum > > | Lbase |
| DifferentialGeometry | dummydg |
| float | gain |
| SampleableSphericalFunction * | func |
Definition at line 35 of file lights/point.h.
| PointLight::PointLight | ( | const Transform & | light2world, | |
| const boost::shared_ptr< Texture< SWCSpectrum > > | L, | |||
| float | gain, | |||
| SampleableSphericalFunction * | ssf | |||
| ) |
Definition at line 51 of file point.cpp.
References func, gain, L(), Lbase, lightPos, and lux::Light::LightToWorld.
Referenced by CreateLight().
| Light * PointLight::CreateLight | ( | const Transform & | light2world, | |
| const ParamSet & | paramSet, | |||
| const TextureParams & | tp | |||
| ) | [static] |
Definition at line 157 of file point.cpp.
References lux::CreateSphericalFunction(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOnePoint(), blender::g, lux::TextureParams::GetSWCSpectrumTexture(), L(), PointLight(), lux::Translate(), lux::Point::x, lux::Point::y, and lux::Point::z.
| virtual bool lux::PointLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 42 of file lights/point.h.
| virtual bool lux::PointLight::IsEnvironmental | ( | ) | const [inline, virtual] |
Implements lux::Light.
Definition at line 43 of file lights/point.h.
| SWCSpectrum PointLight::L | ( | const TsPack * | tspack, | |
| const Vector & | w | |||
| ) | const [private] |
Return the emmitted radiance in the given diretion.
| tspack | The thread specific pack. | |
| w | The normalized direction in LOCAL coordinates. |
Definition at line 101 of file point.cpp.
References dummydg, lux::SampleableSphericalFunction::f(), func, gain, and Lbase.
Referenced by CreateLight(), PointLight(), and Sample_L().
| SWCSpectrum PointLight::Le | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| const Ray & | r, | |||
| const Normal & | n, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| float * | pdfDirect | |||
| ) | const [virtual] |
Reimplemented from lux::Light.
| float PointLight::Pdf | ( | const Point & | p, | |
| const Normal & | n, | |||
| const Point & | po, | |||
| const Normal & | ns | |||
| ) | const [virtual] |
Implements lux::Light.
Definition at line 96 of file point.cpp.
References lux::AbsDot(), lux::DistanceSquared(), and lux::Normalize().
Implements lux::Light.
| SWCSpectrum PointLight::Power | ( | const TsPack * | tspack, | |
| const Scene * | ||||
| ) | const [virtual] |
Implements lux::Light.
Definition at line 67 of file point.cpp.
References lux::SampleableSphericalFunction::Average_f(), dummydg, func, gain, Lbase, and M_PI.
| bool PointLight::Sample_L | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| const Point & | p, | |||
| const Normal & | n, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| float * | pdfDirect, | |||
| VisibilityTester * | visibility, | |||
| SWCSpectrum * | Le | |||
| ) | const [virtual] |
Reimplemented from lux::Light.
Definition at line 128 of file point.cpp.
References BSDF_ALLOC, lux::CoordinateSystem(), dummydg, func, gain, Lbase, lightPos, lux::Normalize(), lux::SampleableSphericalFunction::Pdf(), lux::VisibilityTester::SetSegment(), lux::TsPack::time, lux::UniformSpherePdf(), and lux::Light::WorldToLight.
| bool PointLight::Sample_L | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| SWCSpectrum * | Le | |||
| ) | const [virtual] |
Reimplemented from lux::Light.
Definition at line 104 of file point.cpp.
References BSDF_ALLOC, lux::CoordinateSystem(), dummydg, func, gain, Lbase, lightPos, lux::Light::LightToWorld, lux::SampleableSphericalFunction::Sample_f(), lux::UniformSampleSphere(), lux::UniformSpherePdf(), and lux::Light::WorldToLight.
| SWCSpectrum PointLight::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 78 of file point.cpp.
References lux::Ray::d, dummydg, func, gain, Lbase, lightPos, lux::Light::LightToWorld, lux::Ray::o, lux::SampleableSphericalFunction::Sample_f(), lux::UniformSampleSphere(), and lux::UniformSpherePdf().
| SWCSpectrum PointLight::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 70 of file point.cpp.
References lux::DistanceSquared(), L(), lightPos, lux::Normalize(), lux::VisibilityTester::SetSegment(), lux::TsPack::time, and lux::Light::WorldToLight.
DifferentialGeometry lux::PointLight::dummydg [private] |
Definition at line 75 of file lights/point.h.
Referenced by L(), Power(), and Sample_L().
bool lux::PointLight::flipZ [private] |
Definition at line 73 of file lights/point.h.
SampleableSphericalFunction* lux::PointLight::func [private] |
Definition at line 77 of file lights/point.h.
Referenced by L(), PointLight(), Power(), Sample_L(), and ~PointLight().
float lux::PointLight::gain [private] |
Definition at line 76 of file lights/point.h.
Referenced by L(), PointLight(), Power(), and Sample_L().
boost::shared_ptr< Texture<SWCSpectrum> > lux::PointLight::Lbase [private] |
Definition at line 74 of file lights/point.h.
Referenced by L(), PointLight(), Power(), and Sample_L().
Point lux::PointLight::lightPos [private] |
Definition at line 72 of file lights/point.h.
Referenced by PointLight(), and Sample_L().
1.6.2-20100208