#include <light.h>
Public Member Functions | |
AreaLight (const Transform &light2world, boost::shared_ptr< Texture< SWCSpectrum > > Le, float g, float pow, float e, SampleableSphericalFunction *ssf, int ns, const boost::shared_ptr< Primitive > &prim) | |
virtual | ~AreaLight () |
virtual SWCSpectrum | L (const TsPack *tspack, const DifferentialGeometry &dg, const Vector &w) const |
virtual SWCSpectrum | L (const TsPack *tspack, const Ray &ray, const DifferentialGeometry &dg, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) const |
SWCSpectrum | Power (const TsPack *tspack, const Scene *) const |
virtual bool | IsDeltaLight () const |
virtual bool | IsEnvironmental () const |
virtual float | Pdf (const Point &, const Vector &) const |
virtual float | Pdf (const Point &, const Normal &, const Vector &) const |
virtual float | Pdf (const Point &p, const Normal &n, const Point &po, const Normal &ns) const |
virtual SWCSpectrum | Sample_L (const TsPack *tspack, const Point &P, const Normal &N, float u1, float u2, float u3, Vector *wo, float *pdf, VisibilityTester *visibility) 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 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 |
Static Public Member Functions | |
static AreaLight * | CreateAreaLight (const Transform &light2world, const ParamSet ¶mSet, const TextureParams &tp, const boost::shared_ptr< Primitive > &prim) |
Protected Attributes | |
boost::shared_ptr< Texture < SWCSpectrum > > | Le |
DifferentialGeometry | dummydg |
boost::shared_ptr< Primitive > | prim |
float | gain |
float | power |
float | efficacy |
float | area |
SampleableSphericalFunction * | func |
Definition at line 130 of file light.h.
AreaLight::AreaLight | ( | const Transform & | light2world, | |
boost::shared_ptr< Texture< SWCSpectrum > > | Le, | |||
float | g, | |||
float | pow, | |||
float | e, | |||
SampleableSphericalFunction * | ssf, | |||
int | ns, | |||
const boost::shared_ptr< Primitive > & | prim | |||
) |
AreaLight * AreaLight::CreateAreaLight | ( | const Transform & | light2world, | |
const ParamSet & | paramSet, | |||
const TextureParams & | tp, | |||
const boost::shared_ptr< Primitive > & | prim | |||
) | [static] |
Definition at line 197 of file area.cpp.
References AreaLight(), lux::CreateSphericalFunction(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneInt(), blender::g, lux::TextureParams::GetSWCSpectrumTexture(), L(), lux::Light::nSamples, and p.
virtual bool lux::AreaLight::IsDeltaLight | ( | ) | const [inline, virtual] |
Implements lux::Light.
virtual bool lux::AreaLight::IsEnvironmental | ( | ) | const [inline, virtual] |
Implements lux::Light.
SWCSpectrum AreaLight::L | ( | const TsPack * | tspack, | |
const Ray & | ray, | |||
const DifferentialGeometry & | dg, | |||
const Normal & | n, | |||
BSDF ** | bsdf, | |||
float * | pdf, | |||
float * | pdfDirect | |||
) | const [virtual] |
Definition at line 174 of file area.cpp.
References BSDF_ALLOC, lux::Ray::d, func, L(), lux::DifferentialGeometry::nn, lux::Ray::o, lux::DifferentialGeometry::p, and prim.
virtual SWCSpectrum lux::AreaLight::L | ( | const TsPack * | tspack, | |
const DifferentialGeometry & | dg, | |||
const Vector & | w | |||
) | const [inline, virtual] |
Definition at line 138 of file light.h.
References lux::Dot(), lux::DifferentialGeometry::dpdu, lux::DifferentialGeometry::dpdv, lux::SampleableSphericalFunction::f(), func, gain, Le, and lux::DifferentialGeometry::nn.
Referenced by CreateAreaLight(), L(), lux::Intersection::Le(), and Sample_L().
SWCSpectrum lux::AreaLight::Power | ( | const TsPack * | tspack, | |
const Scene * | ||||
) | const [inline, virtual] |
Implements lux::Light.
Definition at line 155 of file light.h.
References area, lux::SampleableSphericalFunction::Average_f(), dummydg, lux::SampleableSphericalFunction::f(), func, gain, Le, and M_PI.
bool AreaLight::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 150 of file area.cpp.
References BSDF_ALLOC, func, gain, M_PI, lux::DifferentialGeometry::nn, lux::Normalize(), lux::DifferentialGeometry::p, prim, lux::VisibilityTester::SetSegment(), lux::TsPack::time, and lux::DifferentialGeometry::time.
bool AreaLight::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 131 of file area.cpp.
References BSDF_ALLOC, func, gain, M_PI, lux::DifferentialGeometry::nn, lux::DifferentialGeometry::p, prim, lux::TsPack::time, and lux::DifferentialGeometry::time.
SWCSpectrum AreaLight::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 116 of file area.cpp.
References lux::Ray::d, lux::Dot(), lux::RandomGenerator::floatValue(), INV_TWOPI, L(), lux::DifferentialGeometry::nn, lux::Ray::o, lux::DifferentialGeometry::p, prim, lux::TsPack::rng, lux::TsPack::time, lux::DifferentialGeometry::time, and lux::UniformSampleSphere().
SWCSpectrum AreaLight::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 105 of file area.cpp.
References L(), lux::Normalize(), lux::DifferentialGeometry::p, prim, lux::VisibilityTester::SetSegment(), lux::TsPack::time, and lux::DifferentialGeometry::time.
SWCSpectrum AreaLight::Sample_L | ( | const TsPack * | tspack, | |
const Point & | P, | |||
const Normal & | N, | |||
float | u1, | |||
float | u2, | |||
float | u3, | |||
Vector * | wo, | |||
float * | pdf, | |||
VisibilityTester * | visibility | |||
) | const [virtual] |
Reimplemented from lux::Light.
Definition at line 84 of file area.cpp.
References L(), lux::Normalize(), lux::DifferentialGeometry::p, prim, lux::VisibilityTester::SetSegment(), lux::TsPack::time, and lux::DifferentialGeometry::time.
float lux::AreaLight::area [protected] |
Definition at line 180 of file light.h.
Referenced by AreaLight(), and Power().
DifferentialGeometry lux::AreaLight::dummydg [protected] |
float lux::AreaLight::efficacy [protected] |
Definition at line 180 of file light.h.
Referenced by AreaLight().
SampleableSphericalFunction* lux::AreaLight::func [protected] |
Definition at line 181 of file light.h.
Referenced by AreaLight(), L(), Power(), Sample_L(), and ~AreaLight().
float lux::AreaLight::gain [protected] |
Definition at line 180 of file light.h.
Referenced by AreaLight(), L(), Power(), and Sample_L().
boost::shared_ptr<Texture<SWCSpectrum> > lux::AreaLight::Le [protected] |
Definition at line 177 of file light.h.
Referenced by AreaLight(), L(), and Power().
float lux::AreaLight::power [protected] |
Definition at line 180 of file light.h.
Referenced by AreaLight().
boost::shared_ptr<Primitive> lux::AreaLight::prim [protected] |
Definition at line 179 of file light.h.
Referenced by AreaLight(), L(), Pdf(), and Sample_L().