lux::SunLight Class Reference

#include <sun.h>

Inheritance diagram for lux::SunLight:

lux::Light

List of all members.

Public Member Functions

 SunLight (const Transform &light2world, const float sunscale, const Vector &dir, float turb, float relSize, int ns)
bool IsDeltaLight () const
SWCSpectrum Sample_L (const Point &p, Vector *wi, VisibilityTester *) const
SWCSpectrum Power (const Scene *scene) const
SWCSpectrum Le (const RayDifferential &r) const
SWCSpectrum Le (const Scene *scene, const Ray &r, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) 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
SWCSpectrum Sample_L (const Scene *scene, float u1, float u2, BSDF **bsdf, float *pdf) const
SWCSpectrum Sample_L (const Scene *scene, const Point &p, const Normal &n, float u1, float u2, float u3, BSDF **bsdf, float *pdf, float *pdfDirect, VisibilityTester *visibility) const

Static Public Member Functions

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

Private Attributes

Vector sundir
Vector x
Vector y
float turbidity
float thetaS
float phiS
float V
float cosThetaMax
SPDLSPD


Detailed Description

Definition at line 33 of file sun.h.


Constructor & Destructor Documentation

SunLight::SunLight ( const Transform light2world,
const float  sunscale,
const Vector dir,
float  turb,
float  relSize,
int  ns 
)


Member Function Documentation

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

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

Implements lux::Light.

Definition at line 37 of file sun.h.

References cosThetaMax.

SWCSpectrum SunLight::Le ( const Scene scene,
const Ray r,
const Normal n,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect 
) const [virtual]

SWCSpectrum SunLight::Le ( const RayDifferential r  )  const [virtual]

Reimplemented from lux::Light.

Definition at line 136 of file sun.cpp.

References cosThetaMax, lux::Ray::d, lux::Dot(), LSPD, and sundir.

Referenced by Sample_L().

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

Implements lux::Light.

Definition at line 194 of file sun.cpp.

References cosThetaMax, and lux::UniformConePdf().

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

Implements lux::Light.

Definition at line 39 of file sun.h.

References lux::BBox::BoundingSphere(), LSPD, M_PI, and lux::Scene::WorldBound().

SWCSpectrum SunLight::Sample_L ( const Scene scene,
const Point p,
const Normal n,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect,
VisibilityTester visibility 
) const [virtual]

SWCSpectrum SunLight::Sample_L ( const Scene scene,
float  u1,
float  u2,
BSDF **  bsdf,
float *  pdf 
) const [virtual]

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

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

SWCSpectrum SunLight::Sample_L ( const Point p,
Vector wi,
VisibilityTester visibility 
) const [virtual]

Implements lux::Light.

Definition at line 180 of file sun.cpp.

References cosThetaMax, lux::random::floatValue(), Le(), LSPD, lux::VisibilityTester::SetRay(), and sundir.

Referenced by Sample_L().


Member Data Documentation

float lux::SunLight::cosThetaMax [private]

Definition at line 67 of file sun.h.

Referenced by IsDeltaLight(), Le(), Pdf(), Sample_L(), and SunLight().

Definition at line 68 of file sun.h.

Referenced by Le(), Power(), Sample_L(), and SunLight().

float lux::SunLight::phiS [private]

Definition at line 66 of file sun.h.

Referenced by SunLight().

Definition at line 62 of file sun.h.

Referenced by CreateLight(), Le(), Sample_L(), and SunLight().

float lux::SunLight::thetaS [private]

Definition at line 66 of file sun.h.

Referenced by SunLight().

float lux::SunLight::turbidity [private]

Definition at line 65 of file sun.h.

Referenced by SunLight().

float lux::SunLight::V [private]

Definition at line 66 of file sun.h.

Definition at line 64 of file sun.h.

Referenced by Le(), Sample_L(), and SunLight().

Definition at line 64 of file sun.h.

Referenced by Le(), Sample_L(), and SunLight().


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

Generated on Mon May 18 07:13:52 2009 for lux by  doxygen 1.5.8