lux::SkyLight Class Reference

#include <sky.h>

Inheritance diagram for lux::SkyLight:
[legend]
Collaboration diagram for lux::SkyLight:
[legend]

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)
virtual ~SkyLight ()
virtual SWCSpectrum Power (const TsPack *tspack, const Scene *scene) const
virtual bool IsDeltaLight () const
virtual bool IsEnvironmental () const
virtual SWCSpectrum Le (const TsPack *tspack, const RayDifferential &r) const
virtual SWCSpectrum Le (const TsPack *tspack, const Scene *scene, const Ray &r, const Normal &n, BSDF **bsdf, float *pdf, float *pdfDirect) const
virtual SWCSpectrum Sample_L (const TsPack *tspack, const Point &p, const Normal &n, float u1, float u2, float u3, Vector *wi, float *pdf, VisibilityTester *visibility) const
virtual SWCSpectrum Sample_L (const TsPack *tspack, const Point &p, float u1, float u2, float u3, Vector *wi, float *pdf, VisibilityTester *visibility) const
virtual SWCSpectrum Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, float u4, Ray *ray, float *pdf) const
virtual float Pdf (const Point &, const Normal &, const Vector &) const
virtual float Pdf (const Point &, const Vector &) const
virtual float Pdf (const Point &p, const Normal &n, const Point &po, const Normal &ns) const
virtual bool Sample_L (const TsPack *tspack, const Scene *scene, float u1, float u2, float u3, BSDF **bsdf, float *pdf, SWCSpectrum *Le) const
virtual bool Sample_L (const TsPack *tspack, const Scene *scene, const Point &p, const Normal &n, float u1, float u2, float u3, BSDF **bsdf, float *pdf, float *pdfDirect, VisibilityTester *visibility, SWCSpectrum *Le) const
void GetSkySpectralRadiance (const TsPack *tspack, const float theta, const float phi, SWCSpectrum *const dst_spect) const

Static Public Member Functions

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

Private Member Functions

Vector GetSunPosition () const
void SunThetaPhi (float &theta, float &phi) const
RGBColor GetSunSpectralRadiance () const
float GetSunSolidAngle () const
void GetAtmosphericEffects (const Vector &viewer, const Vector &source, RGBColor &atmAttenuation, RGBColor &atmInscatter) const
void InitSunThetaPhi ()
void ChromaticityToSpectrum (const TsPack *tspack, const float x, const float y, SWCSpectrum *const dst_spect) const

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 (  )  [virtual]

Definition at line 139 of file sky.cpp.


Member Function Documentation

void SkyLight::ChromaticityToSpectrum ( const TsPack tspack,
const float  x,
const float  y,
SWCSpectrum *const   dst_spect 
) const [private]
Light * SkyLight::CreateLight ( const Transform light2world,
const ParamSet paramSet,
const TextureParams tp 
) [static]
void lux::SkyLight::GetAtmosphericEffects ( const Vector viewer,
const Vector source,
RGBColor atmAttenuation,
RGBColor atmInscatter 
) const [private]
void SkyLight::GetSkySpectralRadiance ( const TsPack tspack,
const float  theta,
const float  phi,
SWCSpectrum *const   dst_spect 
) const
Vector lux::SkyLight::GetSunPosition (  )  const [private]
float lux::SkyLight::GetSunSolidAngle (  )  const [private]
RGBColor lux::SkyLight::GetSunSpectralRadiance (  )  const [private]
void SkyLight::InitSunThetaPhi (  )  [private]

Definition at line 589 of file sky.cpp.

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

Referenced by SkyLight().

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

Implements lux::Light.

Definition at line 50 of file sky.h.

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

Implements lux::Light.

Definition at line 51 of file sky.h.

SWCSpectrum SkyLight::Le ( const TsPack tspack,
const Scene scene,
const Ray r,
const Normal n,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect 
) const [virtual]
SWCSpectrum SkyLight::Le ( const TsPack tspack,
const RayDifferential r 
) const [virtual]
float SkyLight::Pdf ( const Point p,
const Normal n,
const Point po,
const Normal ns 
) const [virtual]
float SkyLight::Pdf ( const Point ,
const Vector  
) const [virtual]

Implements lux::Light.

Definition at line 369 of file sky.cpp.

References M_PI.

float SkyLight::Pdf ( const Point p,
const Normal n,
const Vector wi 
) const [virtual]
virtual SWCSpectrum lux::SkyLight::Power ( const TsPack tspack,
const Scene scene 
) const [inline, virtual]
bool SkyLight::Sample_L ( const TsPack tspack,
const Scene scene,
const Point p,
const Normal n,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
float *  pdfDirect,
VisibilityTester visibility,
SWCSpectrum Le 
) const [virtual]
bool SkyLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
BSDF **  bsdf,
float *  pdf,
SWCSpectrum Le 
) const [virtual]
SWCSpectrum SkyLight::Sample_L ( const TsPack tspack,
const Scene scene,
float  u1,
float  u2,
float  u3,
float  u4,
Ray ray,
float *  pdf 
) const [virtual]
SWCSpectrum SkyLight::Sample_L ( const TsPack tspack,
const Point p,
float  u1,
float  u2,
float  u3,
Vector wi,
float *  pdf,
VisibilityTester visibility 
) const [virtual]
SWCSpectrum SkyLight::Sample_L ( const TsPack tspack,
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 [private]

Member Data Documentation

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

Definition at line 91 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

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

Definition at line 91 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

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

Definition at line 91 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::phiS [private]

Definition at line 89 of file sky.h.

Referenced by GetSkySpectralRadiance(), and InitSunThetaPhi().

float lux::SkyLight::skyScale [private]

Definition at line 86 of file sky.h.

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

Definition at line 87 of file sky.h.

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

float lux::SkyLight::thetaS [private]

Definition at line 89 of file sky.h.

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

float lux::SkyLight::turbidity [private]

Definition at line 88 of file sky.h.

Referenced by SkyLight().

float lux::SkyLight::zenith_x [private]

Definition at line 90 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::zenith_y [private]

Definition at line 90 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().

float lux::SkyLight::zenith_Y [private]

Definition at line 90 of file sky.h.

Referenced by GetSkySpectralRadiance(), and SkyLight().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208