#include <light.h>
Public Member Functions | |
| virtual | ~Light () |
| Light (const Transform &l2w, int ns=1) | |
| virtual SWCSpectrum | Power (const TsPack *tspack, const Scene *) const =0 |
| virtual bool | IsDeltaLight () const =0 |
| virtual bool | IsEnvironmental () const =0 |
| virtual SWCSpectrum | Le (const TsPack *tspack, const RayDifferential &r) const |
| virtual SWCSpectrum | Le (const TsPack *tspack, const Scene *scene, const Ray &r, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) const |
| virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Point &p, float u1, float u2, float u3, Vector *wi, float *pdf, VisibilityTester *vis) const =0 |
| virtual float | Pdf (const Point &p, const Vector &wi) const =0 |
| virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Point &p, const Normal &n, float u1, float u2, float u3, Vector *wi, float *pdf, VisibilityTester *visibility) const |
| virtual float | Pdf (const Point &p, const Normal &n, const Vector &wi) const |
| virtual float | Pdf (const Point &p, const Normal &n, const Point &po, const Normal &ns) const =0 |
| virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const =0 |
| virtual bool | Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, BSDF **bsdf, float *pdf, SWCSpectrum *L) 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 *L) const |
| void | AddPortalShape (boost::shared_ptr< Primitive > shape) |
Public Attributes | |
| const int | nSamples |
| bool | havePortalShape |
| int | nrPortalShapes |
| vector< boost::shared_ptr < Primitive > > | PortalShapes |
| float | PortalArea |
| int | group |
Protected Attributes | |
| const Transform | LightToWorld |
| const Transform | WorldToLight |
| bool | warnOnce |
Definition at line 37 of file light.h.
Definition at line 41 of file light.h.
References lux::Transform::HasScale(), havePortalShape, LUX_UNIMPLEMENT, LUX_WARNING, luxError, nrPortalShapes, PortalArea, warnOnce, and WorldToLight.
| void Light::AddPortalShape | ( | boost::shared_ptr< Primitive > | shape | ) |
Definition at line 83 of file light.cpp.
References havePortalShape, nrPortalShapes, PortalArea, and PortalShapes.
Referenced by lux::Context::portalShape().
| virtual bool lux::Light::IsDeltaLight | ( | ) | const [pure virtual] |
Implemented in lux::AreaLight, lux::DistantLight, lux::InfiniteAreaLight, lux::InfiniteAreaLightIS, lux::PointLight, lux::ProjectionLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Referenced by getDirectLight(), and lux::BidirIntegrator::Li().
| virtual bool lux::Light::IsEnvironmental | ( | ) | const [pure virtual] |
Implemented in lux::AreaLight, lux::DistantLight, lux::InfiniteAreaLight, lux::InfiniteAreaLightIS, lux::PointLight, lux::ProjectionLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Referenced by getDirectLight(), getEnvironmentLight(), and lux::BidirIntegrator::Li().
| SWCSpectrum Light::Le | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| const Ray & | r, | |||
| const Normal & | n, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| float * | pdfDirect | |||
| ) | const [virtual] |
Reimplemented in lux::InfiniteAreaLight, lux::PointLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
| SWCSpectrum Light::Le | ( | const TsPack * | tspack, | |
| const RayDifferential & | r | |||
| ) | const [virtual] |
Reimplemented in lux::InfiniteAreaLight, lux::InfiniteAreaLightIS, lux::SkyLight, and lux::SunLight.
Definition at line 74 of file light.cpp.
Referenced by getEnvironmentLight().
| virtual float lux::Light::Pdf | ( | const Point & | p, | |
| const Normal & | n, | |||
| const Vector & | wi | |||
| ) | const [inline, virtual] |
Reimplemented in lux::AreaLight, lux::InfiniteAreaLight, and lux::SkyLight.
Definition at line 67 of file light.h.
References Pdf().
Implemented in lux::AreaLight, lux::DistantLight, lux::InfiniteAreaLight, lux::InfiniteAreaLightIS, lux::PointLight, lux::ProjectionLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Referenced by lux::BidirIntegrator::Li(), and Pdf().
| virtual SWCSpectrum lux::Light::Power | ( | const TsPack * | tspack, | |
| const Scene * | ||||
| ) | const [pure virtual] |
| virtual bool lux::Light::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 * | L | |||
| ) | const [inline, virtual] |
Reimplemented in lux::AreaLight, lux::InfiniteAreaLight, lux::PointLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Definition at line 82 of file light.h.
References LUX_BUG, LUX_SEVERE, luxError, and warnOnce.
| virtual bool lux::Light::Sample_L | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| SWCSpectrum * | L | |||
| ) | const [inline, virtual] |
Reimplemented in lux::AreaLight, lux::InfiniteAreaLight, lux::PointLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Definition at line 76 of file light.h.
References LUX_BUG, LUX_SEVERE, luxError, and warnOnce.
| virtual SWCSpectrum lux::Light::Sample_L | ( | const TsPack * | tspack, | |
| const Scene * | scene, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| float | u4, | |||
| Ray * | ray, | |||
| float * | ||||
| ) | const [pure virtual] |
| virtual SWCSpectrum lux::Light::Sample_L | ( | const TsPack * | tspack, | |
| const Point & | p, | |||
| const Normal & | n, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| Vector * | wi, | |||
| float * | pdf, | |||
| VisibilityTester * | visibility | |||
| ) | const [inline, virtual] |
Reimplemented in lux::AreaLight, lux::InfiniteAreaLight, and lux::SkyLight.
Definition at line 62 of file light.h.
References Sample_L().
| virtual SWCSpectrum lux::Light::Sample_L | ( | const TsPack * | tspack, | |
| const Point & | p, | |||
| float | u1, | |||
| float | u2, | |||
| float | u3, | |||
| Vector * | wi, | |||
| float * | pdf, | |||
| VisibilityTester * | vis | |||
| ) | const [pure virtual] |
Implemented in lux::AreaLight, lux::DistantLight, lux::InfiniteAreaLight, lux::InfiniteAreaLightIS, lux::PointLight, lux::ProjectionLight, lux::SkyLight, lux::SpotLight, and lux::SunLight.
Referenced by getDirectLight(), lux::SingleScattering::Li(), lux::BidirIntegrator::Li(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and Sample_L().
Definition at line 97 of file light.h.
Referenced by generateEyePath(), getDirectLight(), getEnvironmentLight(), lux::SingleScattering::Li(), lux::PathIntegrator::Li(), lux::BidirIntegrator::Li(), lux::Context::lightSource(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), and lux::Context::shape().
Definition at line 93 of file light.h.
Referenced by AddPortalShape(), lux::SunLight::checkPortals(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::Le(), Light(), lux::SkyLight::Pdf(), lux::InfiniteAreaLight::Pdf(), lux::SunLight::Power(), lux::SkyLight::Power(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), and lux::InfiniteAreaLight::Sample_L().
const Transform lux::Light::LightToWorld [protected] |
Definition at line 100 of file light.h.
Referenced by lux::DistantLight::DistantLight(), lux::PointLight::PointLight(), lux::ProjectionLight::ProjectionLight(), lux::SpotLight::Sample_L(), lux::ProjectionLight::Sample_L(), lux::PointLight::Sample_L(), lux::InfiniteAreaLightIS::Sample_L(), lux::SpotLight::SpotLight(), and lux::SunLight::SunLight().
Definition at line 94 of file light.h.
Referenced by AddPortalShape(), lux::SunLight::checkPortals(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::Le(), Light(), lux::SkyLight::Pdf(), lux::InfiniteAreaLight::Pdf(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), and lux::InfiniteAreaLight::Sample_L().
| const int lux::Light::nSamples |
Definition at line 92 of file light.h.
Referenced by lux::AreaLight::CreateAreaLight(), lux::SunLight::CreateLight(), lux::SkyLight::CreateLight(), lux::InfiniteAreaLightIS::CreateLight(), lux::InfiniteAreaLight::CreateLight(), lux::PhotonIntegrator::RequestSamples(), and lux::IrradianceCache::RequestSamples().
| float lux::Light::PortalArea |
Definition at line 96 of file light.h.
Referenced by AddPortalShape(), Light(), lux::SunLight::Power(), and lux::SkyLight::Power().
| vector<boost::shared_ptr<Primitive> > lux::Light::PortalShapes |
Definition at line 95 of file light.h.
Referenced by AddPortalShape(), lux::SunLight::checkPortals(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::Le(), lux::SkyLight::Pdf(), lux::InfiniteAreaLight::Pdf(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), and lux::InfiniteAreaLight::Sample_L().
bool lux::Light::warnOnce [mutable, protected] |
Definition at line 101 of file light.h.
Referenced by Light(), and Sample_L().
const Transform lux::Light::WorldToLight [protected] |
Definition at line 100 of file light.h.
Referenced by lux::SpotLight::Falloff(), lux::SkyLight::Le(), lux::InfiniteAreaLightIS::Le(), lux::InfiniteAreaLight::Le(), Light(), lux::InfiniteAreaLightIS::Pdf(), lux::ProjectionLight::Projection(), lux::SkyLight::Sample_L(), lux::PointLight::Sample_L(), and lux::InfiniteAreaLight::Sample_L().
1.6.2-20100208