AreaLight Class Reference

#include <light.h>

Inheritance diagram for AreaLight:

Light

List of all members.

Public Member Functions

 AreaLight (const Transform &light2world, const Spectrum &power, int ns, const Reference< Shape > &shape)
virtual Spectrum L (const Point &p, const Normal &n, const Vector &w) const
Spectrum Power (const Scene *) const
bool IsDeltaLight () const
float Pdf (const Point &, const Vector &) const
float Pdf (const Point &, const Normal &, const Vector &) const
Spectrum Sample_L (const Point &P, Vector *w, VisibilityTester *visibility) const
virtual Spectrum Sample_L (const Point &P, const Normal &N, float u1, float u2, Vector *wo, float *pdf, VisibilityTester *visibility) const
virtual Spectrum Sample_L (const Point &P, float u1, float u2, Vector *wo, float *pdf, VisibilityTester *visibility) const
Spectrum Sample_L (const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const

Protected Attributes

Spectrum Lemit
Reference< Shapeshape
float area


Detailed Description

Definition at line 88 of file light.h.


Constructor & Destructor Documentation

AreaLight::AreaLight ( const Transform light2world,
const Spectrum power,
int  ns,
const Reference< Shape > &  shape 
)

Definition at line 28 of file area.cpp.

References area, Lemit, shape, and Warning().

Referenced by CreateAreaLight().


Member Function Documentation

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

Definition at line 93 of file light.h.

References Dot(), and Lemit.

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

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

Implements Light.

Definition at line 97 of file light.h.

References area, Lemit, and M_PI.

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

Implements Light.

Definition at line 100 of file light.h.

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

Implements Light.

Definition at line 93 of file area.cpp.

References shape.

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

Reimplemented from Light.

Definition at line 69 of file area.cpp.

References shape.

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

Implements Light.

Definition at line 96 of file area.cpp.

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

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

Reimplemented from Light.

Definition at line 58 of file area.cpp.

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

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

Implements Light.

Definition at line 73 of file area.cpp.

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

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

Implements Light.

Definition at line 83 of file area.cpp.

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


Member Data Documentation

Definition at line 113 of file light.h.

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

Definition at line 114 of file light.h.

Referenced by AreaLight(), Pdf(), and Sample_L().

float AreaLight::area [protected]

Definition at line 115 of file light.h.

Referenced by AreaLight(), and Power().


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

Generated on Mon Jul 20 17:31:54 2009 for pbrt by  doxygen 1.5.6