#include <spd.h>
Public Member Functions | |
SPD () | |
~SPD () | |
float | sample (const float lambda) const |
void | sample (u_int n, const float lambda[], float *p) const |
void | AllocateSamples (int n) |
void | Normalize () |
void | Clamp () |
void | Scale (float s) |
Protected Attributes | |
int | nSamples |
float | lambdaMin |
float | lambdaMax |
float | delta |
float | invDelta |
float * | samples |
Definition at line 32 of file spd.h.
lux::SPD::SPD | ( | ) | [inline] |
void SPD::AllocateSamples | ( | int | n | ) |
Definition at line 29 of file spd.cpp.
References lux::AllocAligned(), and samples.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), and lux::BlackbodySPD::init().
void SPD::Clamp | ( | ) |
Definition at line 48 of file spd.cpp.
References INFINITY, nSamples, and samples.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), and lux::BlackbodySPD::init().
void SPD::Normalize | ( | ) |
Definition at line 35 of file spd.cpp.
References cimg_library::cimg::max(), nSamples, and samples.
Referenced by lux::BlackbodySPD::init().
void lux::SPD::sample | ( | u_int | n, | |
const float | lambda[], | |||
float * | p | |||
) | const [inline] |
Definition at line 53 of file spd.h.
References Floor2Int(), invDelta, lambdaMax, lambdaMin, Lerp(), cimg_library::cimg::min(), nSamples, and samples.
float lux::SPD::sample | ( | const float | lambda | ) | const [inline] |
Definition at line 41 of file spd.h.
References Floor2Int(), invDelta, lambdaMax, lambdaMin, Lerp(), cimg_library::cimg::min(), nSamples, and samples.
Referenced by lux::SpectrumWavelengths::Sample(), lux::SunLight::SunLight(), and lux::SWCSpectrum::SWCSpectrum().
void SPD::Scale | ( | float | s | ) |
Definition at line 55 of file spd.cpp.
References nSamples, and samples.
Referenced by lux::AreaLight::AreaLight(), lux::DistantLight::DistantLight(), lux::RGBIllumSPD::init(), lux::PointLight::PointLight(), lux::SpectrumWavelengths::SpectrumWavelengths(), lux::SpotLight::SpotLight(), and lux::SunLight::SunLight().
float lux::SPD::delta [protected] |
Definition at line 75 of file spd.h.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), and SPD().
float lux::SPD::invDelta [protected] |
Definition at line 75 of file spd.h.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), sample(), and SPD().
float lux::SPD::lambdaMax [protected] |
Definition at line 74 of file spd.h.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), lux::IrregularSPD::IrregularSPD(), sample(), and SPD().
float lux::SPD::lambdaMin [protected] |
Definition at line 74 of file spd.h.
Referenced by lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), lux::IrregularSPD::IrregularSPD(), sample(), and SPD().
int lux::SPD::nSamples [protected] |
Definition at line 73 of file spd.h.
Referenced by lux::RGBIllumSPD::AddWeighted(), Clamp(), lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), Normalize(), sample(), Scale(), and SPD().
float* lux::SPD::samples [protected] |
Definition at line 76 of file spd.h.
Referenced by lux::RGBIllumSPD::AddWeighted(), AllocateSamples(), Clamp(), lux::RGBIllumSPD::init(), lux::RegularSPD::init(), lux::IrregularSPD::init(), lux::BlackbodySPD::init(), Normalize(), sample(), and Scale().