lux::AreaLight Class Reference

#include <light.h>

Inheritance diagram for lux::AreaLight:

lux::Light

List of all members.

Public Member Functions

 AreaLight (const Transform &light2world, const Spectrum &power, float g, int ns, const boost::shared_ptr< Shape > &shape)
 ~AreaLight ()
virtual SWCSpectrum L (const Point &p, const Normal &n, const Vector &w) const
virtual SWCSpectrum L (const Ray &ray, const DifferentialGeometry &dg, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) const
SWCSpectrum Power (const Scene *) const
bool IsDeltaLight () const
float Pdf (const Point &, const Vector &) const
float Pdf (const Point &, const Normal &, const Vector &) const
SWCSpectrum Sample_L (const Point &P, Vector *w, VisibilityTester *visibility) const
virtual SWCSpectrum Sample_L (const Point &P, const Normal &N, float u1, float u2, float u3, Vector *wo, float *pdf, VisibilityTester *visibility) const
virtual SWCSpectrum Sample_L (const Point &P, float u1, float u2, float u3, Vector *wo, float *pdf, VisibilityTester *visibility) const
SWCSpectrum Sample_L (const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const
virtual SWCSpectrum Sample_L (const Scene *scene, float u1, float u2, BSDF **bsdf, float *pdf) const
virtual SWCSpectrum Sample_L (const Scene *scene, const Point &p, const Normal &n, float u1, float u2, float u3, BSDF **bsdf, float *pdf, float *pdfDirect, VisibilityTester *visibility) const
virtual float Pdf (const Scene *scene, const Point &p) const
void SamplePosition (float u1, float u2, Point *p, Normal *n, float *pdf) const
void SampleDirection (float u1, float u2, const Normal &nn, Vector *wo, float *pdf) const
float EvalPositionPdf (const Point p, const Normal &n, const Vector &w) const
float EvalDirectionPdf (const Point p, const Normal &n, const Vector &w) const
SWCSpectrum Eval (const Normal &n, const Vector &w) const

Static Public Member Functions

static AreaLightCreateAreaLight (const Transform &light2world, const ParamSet &paramSet, const boost::shared_ptr< Shape > &shape)

Protected Attributes

SPDLSPD
boost::shared_ptr< Shapeshape
float area


Detailed Description

Definition at line 126 of file light.h.


Constructor & Destructor Documentation

AreaLight::AreaLight ( const Transform light2world,
const Spectrum power,
float  g,
int  ns,
const boost::shared_ptr< Shape > &  shape 
)

Definition at line 36 of file area.cpp.

References area, LSPD, lux::SPD::Scale(), and shape.

Referenced by CreateAreaLight().

lux::AreaLight::~AreaLight (  )  [inline]

Definition at line 131 of file light.h.

References LSPD.


Member Function Documentation

AreaLight * AreaLight::CreateAreaLight ( const Transform light2world,
const ParamSet paramSet,
const boost::shared_ptr< Shape > &  shape 
) [static]

SWCSpectrum AreaLight::Eval ( const Normal n,
const Vector w 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 181 of file area.cpp.

References lux::Dot(), and LSPD.

float AreaLight::EvalDirectionPdf ( const Point  p,
const Normal n,
const Vector w 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 177 of file area.cpp.

References lux::AbsDot(), lux::Dot(), and INV_PI.

float AreaLight::EvalPositionPdf ( const Point  p,
const Normal n,
const Vector w 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 173 of file area.cpp.

References lux::Dot(), and shape.

bool lux::AreaLight::IsDeltaLight (  )  const [inline, virtual]

Implements lux::Light.

Definition at line 140 of file light.h.

SWCSpectrum AreaLight::L ( const Ray ray,
const DifferentialGeometry dg,
const Normal n,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect 
) const [virtual]

virtual SWCSpectrum lux::AreaLight::L ( const Point p,
const Normal n,
const Vector w 
) const [inline, virtual]

Definition at line 132 of file light.h.

References lux::Dot(), and LSPD.

Referenced by CreateAreaLight(), L(), lux::Intersection::Le(), and Sample_L().

float AreaLight::Pdf ( const Scene scene,
const Point p 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 144 of file area.cpp.

References shape.

float AreaLight::Pdf ( const Point p,
const Normal N,
const Vector wi 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 78 of file area.cpp.

References shape.

float AreaLight::Pdf ( const Point P,
const Vector w 
) const [virtual]

Implements lux::Light.

Definition at line 102 of file area.cpp.

References shape.

SWCSpectrum lux::AreaLight::Power ( const Scene  )  const [inline, virtual]

Implements lux::Light.

Definition at line 137 of file light.h.

References area, LSPD, and M_PI.

SWCSpectrum AreaLight::Sample_L ( const Scene scene,
const Point p,
const Normal n,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect,
VisibilityTester visibility 
) const [virtual]

SWCSpectrum AreaLight::Sample_L ( const Scene scene,
float  u1,
float  u2,
BSDF **  bsdf,
float *  pdf 
) const [virtual]

M_PI

Reimplemented from lux::Light.

Definition at line 115 of file area.cpp.

References BSDF_ALLOC, lux::CoordinateSystem(), L(), and shape.

SWCSpectrum AreaLight::Sample_L ( const Scene scene,
float  u1,
float  u2,
float  u3,
float  u4,
Ray ray,
float *  pdf 
) const [virtual]

Implements lux::Light.

Definition at line 92 of file area.cpp.

References lux::Ray::d, lux::Dot(), INV_TWOPI, L(), lux::Ray::o, shape, and lux::UniformSampleSphere().

SWCSpectrum AreaLight::Sample_L ( const Point P,
float  u1,
float  u2,
float  u3,
Vector wo,
float *  pdf,
VisibilityTester visibility 
) const [virtual]

Implements lux::Light.

Definition at line 82 of file area.cpp.

References L(), lux::Normalize(), lux::VisibilityTester::SetSegment(), and shape.

SWCSpectrum AreaLight::Sample_L ( 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 67 of file area.cpp.

References L(), lux::Normalize(), lux::VisibilityTester::SetSegment(), and shape.

SWCSpectrum AreaLight::Sample_L ( const Point P,
Vector w,
VisibilityTester visibility 
) const [virtual]

void AreaLight::SampleDirection ( float  u1,
float  u2,
const Normal nn,
Vector wo,
float *  pdf 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 162 of file area.cpp.

References lux::AbsDot(), lux::CosineSampleHemisphere(), INV_PI, and lux::TransformAccordingNormal().

void AreaLight::SamplePosition ( float  u1,
float  u2,
Point p,
Normal n,
float *  pdf 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 157 of file area.cpp.

References shape.


Member Data Documentation

float lux::AreaLight::area [protected]

Definition at line 166 of file light.h.

Referenced by AreaLight(), and Power().

SPD* lux::AreaLight::LSPD [protected]

Definition at line 164 of file light.h.

Referenced by AreaLight(), Eval(), L(), Power(), and ~AreaLight().

boost::shared_ptr<Shape> lux::AreaLight::shape [protected]

Definition at line 165 of file light.h.

Referenced by AreaLight(), EvalPositionPdf(), L(), Pdf(), Sample_L(), and SamplePosition().


The documentation for this class was generated from the following files:

Generated on Mon May 18 07:15:18 2009 for lux by  doxygen 1.5.7.1