SpotLight Class Reference

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, Vector *wi, VisibilityTester *vis) const
bool IsDeltaLight () const
float Falloff (const Vector &w) const
Spectrum Power (const Scene *) const
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
float Pdf (const Point &, const Vector &) const

Private Attributes

float cosTotalWidth
float cosFalloffStart
Point lightPos
Spectrum Intensity


Detailed Description

Definition at line 29 of file spot.cpp.


Constructor & Destructor Documentation

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

Definition at line 52 of file spot.cpp.

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

Referenced by CreateLight().


Member Function Documentation

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

Implements Light.

Definition at line 60 of file spot.cpp.

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

Referenced by Sample_L().

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

Implements Light.

Definition at line 34 of file spot.cpp.

float SpotLight::Falloff ( const Vector w  )  const

Definition at line 67 of file spot.cpp.

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

Referenced by Sample_L().

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

Implements Light.

Definition at line 36 of file spot.cpp.

References cosFalloffStart, cosTotalWidth, Intensity, and M_PI.

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

Implements Light.

Definition at line 79 of file spot.cpp.

References Sample_L().

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

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

Implements Light.

Definition at line 84 of file spot.cpp.


Member Data Documentation

float SpotLight::cosTotalWidth [private]

Definition at line 47 of file spot.cpp.

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

float SpotLight::cosFalloffStart [private]

Definition at line 47 of file spot.cpp.

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

Definition at line 48 of file spot.cpp.

Referenced by Sample_L(), and SpotLight().

Definition at line 49 of file spot.cpp.

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


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

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