lux::SpotLight Class Reference

#include <spot.h>

Inheritance diagram for lux::SpotLight:

lux::Light

List of all members.

Public Member Functions

 SpotLight (const Transform &light2world, const Spectrum &, float gain, float width, float fall)
 ~SpotLight ()
SWCSpectrum Sample_L (const Point &p, Vector *wi, VisibilityTester *vis) const
bool IsDeltaLight () const
float Falloff (const Vector &w) const
SWCSpectrum Power (const Scene *) const
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
float Pdf (const Point &, const Vector &) const

Static Public Member Functions

static LightCreateLight (const Transform &light2world, const ParamSet &paramSet)

Private Attributes

float cosTotalWidth
float cosFalloffStart
Point lightPos
SPDLSPD


Detailed Description

Definition at line 32 of file spot.h.


Constructor & Destructor Documentation

SpotLight::SpotLight ( const Transform light2world,
const Spectrum intensity,
float  gain,
float  width,
float  fall 
)

Definition at line 31 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, lightPos, lux::Light::LightToWorld, LSPD, Radians(), and lux::SPD::Scale().

Referenced by CreateLight().

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

Definition at line 36 of file spot.h.

References LSPD.


Member Function Documentation

Light * SpotLight::CreateLight ( const Transform light2world,
const ParamSet paramSet 
) [static]

float SpotLight::Falloff ( const Vector w  )  const

Definition at line 50 of file spot.cpp.

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

Referenced by Sample_L().

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

Implements lux::Light.

Definition at line 38 of file spot.h.

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

Implements lux::Light.

Definition at line 67 of file spot.cpp.

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

Implements lux::Light.

Definition at line 40 of file spot.h.

References cosFalloffStart, cosTotalWidth, LSPD, and M_PI.

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

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

References Sample_L().

SWCSpectrum SpotLight::Sample_L ( const Point p,
Vector wi,
VisibilityTester vis 
) const [virtual]

Implements lux::Light.

Definition at line 43 of file spot.cpp.

References lux::DistanceSquared(), Falloff(), lightPos, LSPD, lux::Normalize(), and lux::VisibilityTester::SetSegment().

Referenced by Sample_L().


Member Data Documentation

Definition at line 54 of file spot.h.

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

Definition at line 54 of file spot.h.

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

Definition at line 55 of file spot.h.

Referenced by Sample_L(), and SpotLight().

Definition at line 56 of file spot.h.

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


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

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