lux::SkyLight Class Reference

#include <sky.h>

Inheritance diagram for lux::SkyLight:

lux::Light

List of all members.

Public Member Functions

 SkyLight (const Transform &light2world, const float skyscale, int ns, Vector sd, float turb, float aconst, float bconst, float cconst, float dconst, float econst)
 ~SkyLight ()
SWCSpectrum Power (const Scene *scene) const
bool IsDeltaLight () 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, const Normal &n, float u1, float u2, float u3, Vector *wi, float *pdf, VisibilityTester *visibility) const
SWCSpectrum Sample_L (const Point &p, float u1, float u2, float u3, Vector *wi, 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 Normal &, const Vector &) const
float Pdf (const Point &, const Vector &) const
SWCSpectrum Sample_L (const Point &P, Vector *w, VisibilityTester *visibility) 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
Vector GetSunPosition () const
void SunThetaPhi (float &theta, float &phi) const
Spectrum GetSunSpectralRadiance () const
float GetSunSolidAngle () const
void GetSkySpectralRadiance (const float theta, const float phi, SWCSpectrum *const dst_spect) const
void GetAtmosphericEffects (const Vector &viewer, const Vector &source, Spectrum &atmAttenuation, Spectrum &atmInscatter) const
void InitSunThetaPhi ()
void ChromaticityToSpectrum (const float x, const float y, SWCSpectrum *const dst_spect) const
float PerezFunction (const float *lam, float theta, float phi, float lvz) const

Static Public Member Functions

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

Private Attributes

float skyScale
Vector sundir
float turbidity
float thetaS
float phiS
float zenith_Y
float zenith_x
float zenith_y
float perez_Y [6]
float perez_x [6]
float perez_y [6]


Detailed Description

Definition at line 35 of file sky.h.


Constructor & Destructor Documentation

SkyLight::SkyLight ( const Transform light2world,
const float  skyscale,
int  ns,
Vector  sd,
float  turb,
float  aconst,
float  bconst,
float  cconst,
float  dconst,
float  econst 
)

SkyLight::~SkyLight (  ) 

Definition at line 55 of file sky.cpp.


Member Function Documentation

void SkyLight::ChromaticityToSpectrum ( const float  x,
const float  y,
SWCSpectrum *const   dst_spect 
) const

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

void lux::SkyLight::GetAtmosphericEffects ( const Vector viewer,
const Vector source,
Spectrum atmAttenuation,
Spectrum atmInscatter 
) const

void SkyLight::GetSkySpectralRadiance ( const float  theta,
const float  phi,
SWCSpectrum *const   dst_spect 
) const

Vector lux::SkyLight::GetSunPosition (  )  const

float lux::SkyLight::GetSunSolidAngle (  )  const

Spectrum lux::SkyLight::GetSunSpectralRadiance (  )  const

void SkyLight::InitSunThetaPhi (  ) 

Definition at line 406 of file sky.cpp.

References lux::Normalize(), phiS, lux::SphericalPhi(), lux::SphericalTheta(), sundir, and thetaS.

Referenced by SkyLight().

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

Implements lux::Light.

Definition at line 48 of file sky.h.

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

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

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

Implements lux::Light.

Definition at line 239 of file sky.cpp.

References M_PI.

float SkyLight::Pdf ( const Point ,
const Normal n,
const Vector wi 
) const [virtual]

Reimplemented from lux::Light.

Definition at line 199 of file sky.cpp.

References lux::AbsDot(), and INV_TWOPI.

float SkyLight::PerezFunction ( const float *  lam,
float  theta,
float  phi,
float  lvz 
) const [inline]

Definition at line 419 of file sky.cpp.

References cimg_library::cos(), cimg_library::exp(), and thetaS.

Referenced by GetSkySpectralRadiance().

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

Implements lux::Light.

Definition at line 40 of file sky.h.

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

SWCSpectrum SkyLight::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 SkyLight::Sample_L ( const Scene scene,
float  u1,
float  u2,
BSDF **  bsdf,
float *  pdf 
) const [virtual]

SWCSpectrum SkyLight::Sample_L ( const Point P,
Vector w,
VisibilityTester visibility 
) const [virtual]

Implements lux::Light.

Definition at line 282 of file sky.cpp.

References lux::random::floatValue(), and Sample_L().

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

SWCSpectrum SkyLight::Sample_L ( const Point p,
float  u1,
float  u2,
float  u3,
Vector wi,
float *  pdf,
VisibilityTester visibility 
) const [virtual]

SWCSpectrum SkyLight::Sample_L ( const Point p,
const Normal n,
float  u1,
float  u2,
float  u3,
Vector wi,
float *  pdf,
VisibilityTester visibility 
) const [virtual]

void lux::SkyLight::SunThetaPhi ( float &  theta,
float &  phi 
) const


Member Data Documentation

float lux::SkyLight::perez_x[6] [private]

Definition at line 88 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::perez_y[6] [private]

Definition at line 88 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::perez_Y[6] [private]

Definition at line 88 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::phiS [private]

Definition at line 86 of file sky.h.

Referenced by GetSkySpectralRadiance(), and InitSunThetaPhi().

float lux::SkyLight::skyScale [private]

Definition at line 83 of file sky.h.

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

Definition at line 84 of file sky.h.

Referenced by CreateLight(), InitSunThetaPhi(), and SkyLight().

float lux::SkyLight::thetaS [private]

Definition at line 86 of file sky.h.

Referenced by GetSkySpectralRadiance(), InitSunThetaPhi(), PerezFunction(), and SkyLight().

float lux::SkyLight::turbidity [private]

Definition at line 85 of file sky.h.

Referenced by SkyLight().

float lux::SkyLight::zenith_x [private]

Definition at line 87 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::zenith_y [private]

Definition at line 87 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::zenith_Y [private]

Definition at line 87 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().


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

Generated on Fri Jul 24 11:52:04 2009 for lux by  doxygen 1.5.9