lux::PointLight Class Reference

#include <point.h>

Inheritance diagram for lux::PointLight:
[legend]
Collaboration diagram for lux::PointLight:
[legend]

List of all members.

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 LightCreateLight (const Transform &light2world, const ParamSet &paramSet, 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
SampleableSphericalFunctionfunc

Detailed Description

Definition at line 35 of file lights/point.h.


Constructor & Destructor Documentation

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().

PointLight::~PointLight (  )  [virtual]

Definition at line 63 of file point.cpp.

References func.


Member Function Documentation

Light * PointLight::CreateLight ( const Transform light2world,
const ParamSet paramSet,
const TextureParams tp 
) [static]
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.

Parameters:
tspack The thread specific pack.
w The normalized direction in LOCAL coordinates.
Returns:
The emmitted radiance.

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.

Definition at line 152 of file point.cpp.

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().

float PointLight::Pdf ( const Point ,
const Vector  
) const [virtual]

Implements lux::Light.

Definition at line 93 of file point.cpp.

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]
bool PointLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
SWCSpectrum Le 
) const [virtual]
SWCSpectrum PointLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
float  u4,
Ray ray,
float *  pdf 
) const [virtual]
SWCSpectrum PointLight::Sample_L ( const TsPack tspack,
const Point P,
float  u1,
float  u2,
float  u3,
Vector wo,
float *  pdf,
VisibilityTester visibility 
) const [virtual]

Member Data Documentation

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.

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().

Definition at line 72 of file lights/point.h.

Referenced by PointLight(), and Sample_L().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208