lux::SpotLight Class Reference

#include <spot.h>

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

List of all members.

Public Member Functions

 SpotLight (const Transform &light2world, const boost::shared_ptr< Texture< SWCSpectrum > > L, float gain, float width, float fall)
virtual ~SpotLight ()
virtual bool IsDeltaLight () const
virtual bool IsEnvironmental () const
float Falloff (const Vector &w) 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 Attributes

float cosTotalWidth
float cosFalloffStart
Point lightPos
boost::shared_ptr< Texture
< SWCSpectrum > > 
Lbase
DifferentialGeometry dummydg
float gain

Detailed Description

Definition at line 32 of file spot.h.


Constructor & Destructor Documentation

SpotLight::SpotLight ( const Transform light2world,
const boost::shared_ptr< Texture< SWCSpectrum > >  L,
float  gain,
float  width,
float  fall 
)

Definition at line 72 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, gain, Lbase, lightPos, lux::Light::LightToWorld, and Radians().

Referenced by CreateLight().

SpotLight::~SpotLight (  )  [virtual]

Definition at line 85 of file spot.cpp.


Member Function Documentation

Light * SpotLight::CreateLight ( const Transform light2world,
const ParamSet paramSet,
const TextureParams tp 
) [static]
float SpotLight::Falloff ( const Vector w  )  const

Definition at line 86 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, LocalFalloff(), lux::Normalize(), and lux::Light::WorldToLight.

Referenced by Sample_L().

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

Implements lux::Light.

Definition at line 38 of file spot.h.

virtual bool lux::SpotLight::IsEnvironmental (  )  const [inline, virtual]

Implements lux::Light.

Definition at line 39 of file spot.h.

SWCSpectrum SpotLight::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 143 of file spot.cpp.

float SpotLight::Pdf ( const Point p,
const Normal n,
const Point po,
const Normal ns 
) const [virtual]

Implements lux::Light.

Definition at line 100 of file spot.cpp.

References lux::AbsDot(), lux::DistanceSquared(), and lux::Normalize().

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

Implements lux::Light.

Definition at line 97 of file spot.cpp.

virtual SWCSpectrum lux::SpotLight::Power ( const TsPack tspack,
const Scene  
) const [inline, virtual]

Implements lux::Light.

Definition at line 41 of file spot.h.

References cosFalloffStart, cosTotalWidth, dummydg, Lbase, and M_PI.

bool SpotLight::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 SpotLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
SWCSpectrum Le 
) const [virtual]
SWCSpectrum SpotLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
float  u4,
Ray ray,
float *  pdf 
) const [virtual]
SWCSpectrum SpotLight::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 63 of file spot.h.

Referenced by Falloff(), Power(), Sample_L(), and SpotLight().

Definition at line 63 of file spot.h.

Referenced by Falloff(), Power(), Sample_L(), and SpotLight().

Definition at line 66 of file spot.h.

Referenced by Power(), and Sample_L().

float lux::SpotLight::gain [private]

Definition at line 67 of file spot.h.

Referenced by Sample_L(), and SpotLight().

boost::shared_ptr< Texture<SWCSpectrum> > lux::SpotLight::Lbase [private]

Definition at line 65 of file spot.h.

Referenced by Power(), Sample_L(), and SpotLight().

Definition at line 64 of file spot.h.

Referenced by Sample_L(), and SpotLight().


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