SpotLight Class Reference

#include <spot.h>

Inheritance diagram for SpotLight:
Light

List of all members.

Public Member Functions

 SpotLight (const Transform &light2world, const Spectrum &, float width, float fall)
Spectrum Sample_L (const Point &p, float pEpsilon, const LightSample &ls, float time, Vector *wi, float *pdf, VisibilityTester *vis) const
bool IsDeltaLight () const
float Falloff (const Vector &w) const
Spectrum Power (const Scene *) const
Spectrum Sample_L (const Scene *scene, const LightSample &ls, float u1, float u2, float time, Ray *ray, Normal *Ns, float *pdf) const
float Pdf (const Point &, const Vector &) const

Private Attributes

Point lightPos
Spectrum Intensity
float cosTotalWidth
float cosFalloffStart

Detailed Description

Definition at line 37 of file spot.h.


Constructor & Destructor Documentation

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

Definition at line 32 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, Intensity, lightPos, Light::LightToWorld, and Radians().


Member Function Documentation

float SpotLight::Falloff ( const Vector w  )  const

Definition at line 52 of file spot.cpp.

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

Referenced by Sample_L().

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

Implements Light.

Definition at line 43 of file spot.h.

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

Implements Light.

Definition at line 93 of file spot.cpp.

Spectrum SpotLight::Power ( const Scene  )  const [virtual]

Implements Light.

Definition at line 64 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, Intensity, and M_PI.

Spectrum SpotLight::Sample_L ( const Scene scene,
const LightSample ls,
float  u1,
float  u2,
float  time,
Ray ray,
Normal Ns,
float *  pdf 
) const [virtual]
Spectrum SpotLight::Sample_L ( const Point p,
float  pEpsilon,
const LightSample ls,
float  time,
Vector wi,
float *  pdf,
VisibilityTester vis 
) const [virtual]

Implements Light.

Definition at line 42 of file spot.cpp.

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


Member Data Documentation

float SpotLight::cosFalloffStart [private]

Definition at line 53 of file spot.h.

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

float SpotLight::cosTotalWidth [private]

Definition at line 53 of file spot.h.

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

Definition at line 52 of file spot.h.

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

Definition at line 51 of file spot.h.

Referenced by Sample_L(), and SpotLight().


The documentation for this class was generated from the following files:
Generated on Sat Aug 28 20:00:15 2010 for pbrt by  doxygen 1.6.3