#include <spectrum.h>
Public Member Functions | |
SWCSpectrum (Scalar v=0.f) | |
SWCSpectrum (const TsPack *tspack, const RGBColor &s) | |
SWCSpectrum (const TsPack *tspack, const SPD *s) | |
SWCSpectrum (const float cs[WAVELENGTH_SAMPLES]) | |
SWCSpectrum | operator+ (const SWCSpectrum &s2) const |
SWCSpectrum & | operator+= (const SWCSpectrum &s2) |
SWCSpectrum | operator- (const SWCSpectrum &s2) const |
SWCSpectrum & | operator-= (const SWCSpectrum &s2) |
SWCSpectrum | operator/ (const SWCSpectrum &s2) const |
SWCSpectrum & | operator/= (const SWCSpectrum &sp) |
SWCSpectrum | operator* (const SWCSpectrum &sp) const |
SWCSpectrum & | operator*= (const SWCSpectrum &sp) |
SWCSpectrum | operator* (Scalar a) const |
SWCSpectrum & | operator*= (Scalar a) |
SWCSpectrum | operator/ (Scalar a) const |
SWCSpectrum & | operator/= (Scalar a) |
void | AddWeighted (Scalar w, const SWCSpectrum &s) |
bool | operator== (const SWCSpectrum &sp) const |
bool | operator!= (const SWCSpectrum &sp) const |
bool | Black () const |
SWCSpectrum | Sqrt () const |
SWCSpectrum | Pow (const SWCSpectrum &e) const |
SWCSpectrum | operator- () const |
SWCSpectrum | Clamp (Scalar low=0.f, Scalar high=INFINITY) const |
bool | IsNaN () const |
void | Print (FILE *f) const |
XYZColor | ToXYZ (const TsPack *tspack) const |
Scalar | Y (const TsPack *tspack) const |
Scalar | Filter (const TsPack *tspack) const |
Public Attributes | |
Scalar | c [WAVELENGTH_SAMPLES] |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Friends | |
class | boost::serialization::access |
class | lux::ParamSet |
ostream & | operator<< (ostream &, const SWCSpectrum &) |
SWCSpectrum | operator* (Scalar a, const SWCSpectrum &s) |
SWCSpectrum | Exp (const SWCSpectrum &s) |
Definition at line 39 of file spectrum.h.
lux::SWCSpectrum::SWCSpectrum | ( | Scalar | v = 0.f |
) | [inline] |
Definition at line 43 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Definition at line 88 of file spectrum.cpp.
References AddWeighted(), b, c, lux::Color::c, blender::g, lux::r, lux::SpectrumWavelengths::spect_b, lux::SpectrumWavelengths::spect_c, lux::SpectrumWavelengths::spect_g, lux::SpectrumWavelengths::spect_m, lux::SpectrumWavelengths::spect_r, lux::SpectrumWavelengths::spect_w, lux::SpectrumWavelengths::spect_y, lux::TsPack::swl, and WAVELENGTH_SAMPLES.
Definition at line 81 of file spectrum.cpp.
References c, lux::SPD::sample(), lux::TsPack::swl, lux::SpectrumWavelengths::w, and WAVELENGTH_SAMPLES.
lux::SWCSpectrum::SWCSpectrum | ( | const float | cs[WAVELENGTH_SAMPLES] | ) | [inline] |
Definition at line 51 of file spectrum.h.
References c.
void lux::SWCSpectrum::AddWeighted | ( | Scalar | w, | |
const SWCSpectrum & | s | |||
) | [inline] |
Definition at line 121 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::SpecularTransmission::f(), lux::OrenNayar::f(), lux::Microfacet::f(), lux::FresnelBlend::f(), lux::CookTorrance::f(), lux::MixBSDF::f(), lux::MixBSDF::rho(), lux::BxDF::rho(), lux::MixBSDF::Sample_f(), and SWCSpectrum().
bool lux::SWCSpectrum::Black | ( | ) | const [inline] |
Definition at line 133 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by evalPath(), lux::RoughGlass::GetBSDF(), lux::MatteTranslucent::GetBSDF(), lux::Glass::GetBSDF(), lux::SingleScattering::Li(), lux::PathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), and lux::VisibilityTester::TestOcclusion().
SWCSpectrum lux::SWCSpectrum::Clamp | ( | Scalar | low = 0.f , |
|
Scalar | high = INFINITY | |||
) | const [inline] |
Definition at line 162 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::FresnelGeneral::Evaluate(), lux::FresnelDielectric::Evaluate(), and lux::Glossy::GetBSDF().
Scalar SWCSpectrum::Filter | ( | const TsPack * | tspack | ) | const |
Definition at line 67 of file spectrum.cpp.
References c, lux::inv_WAVELENGTH_SAMPLES, Scalar, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, lux::TsPack::swl, and WAVELENGTH_SAMPLES.
Referenced by getDirectLight(), lux::FresnelGeneral::Index(), lux::FresnelConductor::Index(), lux::SingleScattering::Li(), lux::PathIntegrator::Li(), lux::EmissionIntegrator::Li(), lux::BidirIntegrator::Li(), lux::DistributedPath::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), lux::IGIIntegrator::Preprocess(), lux::Lafortune::Sample_f(), lux::SpecularTransmission::Weight(), and lux::SpecularReflection::Weight().
bool lux::SWCSpectrum::IsNaN | ( | ) | const [inline] |
Definition at line 169 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
bool lux::SWCSpectrum::operator!= | ( | const SWCSpectrum & | sp | ) | const [inline] |
Definition at line 130 of file spectrum.h.
SWCSpectrum lux::SWCSpectrum::operator* | ( | Scalar | a | ) | const [inline] |
Definition at line 100 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::operator* | ( | const SWCSpectrum & | sp | ) | const [inline] |
Definition at line 89 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum& lux::SWCSpectrum::operator*= | ( | Scalar | a | ) | [inline] |
Definition at line 106 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum& lux::SWCSpectrum::operator*= | ( | const SWCSpectrum & | sp | ) | [inline] |
Definition at line 95 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::operator+ | ( | const SWCSpectrum & | s2 | ) | const [inline] |
Definition at line 56 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum& lux::SWCSpectrum::operator+= | ( | const SWCSpectrum & | s2 | ) | [inline] |
Definition at line 62 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::operator- | ( | ) | const [inline] |
Definition at line 150 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::operator- | ( | const SWCSpectrum & | s2 | ) | const [inline] |
Definition at line 67 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum& lux::SWCSpectrum::operator-= | ( | const SWCSpectrum & | s2 | ) | [inline] |
Definition at line 73 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::operator/ | ( | Scalar | a | ) | const [inline] |
Definition at line 115 of file spectrum.h.
SWCSpectrum lux::SWCSpectrum::operator/ | ( | const SWCSpectrum & | s2 | ) | const [inline] |
Definition at line 78 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum& lux::SWCSpectrum::operator/= | ( | Scalar | a | ) | [inline] |
Definition at line 118 of file spectrum.h.
SWCSpectrum& lux::SWCSpectrum::operator/= | ( | const SWCSpectrum & | sp | ) | [inline] |
Definition at line 84 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
bool lux::SWCSpectrum::operator== | ( | const SWCSpectrum & | sp | ) | const [inline] |
Definition at line 125 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::Pow | ( | const SWCSpectrum & | e | ) | const [inline] |
Definition at line 144 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::Lafortune::f().
void lux::SWCSpectrum::Print | ( | FILE * | f | ) | const [inline] |
Definition at line 174 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
void lux::SWCSpectrum::serialize | ( | Archive & | ar, | |
const unsigned int | version | |||
) | [inline, private] |
Definition at line 193 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
SWCSpectrum lux::SWCSpectrum::Sqrt | ( | ) | const [inline] |
Definition at line 138 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Definition at line 32 of file spectrum.cpp.
References c, lux::SpectrumWavelengths::cie_X, lux::SpectrumWavelengths::cie_Y, lux::SpectrumWavelengths::cie_Z, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, lux::TsPack::swl, and WAVELENGTH_SAMPLES.
Referenced by getDirectLight(), lux::ExPhotonIntegrator::Li(), and lux::BidirIntegrator::Li().
Scalar SWCSpectrum::Y | ( | const TsPack * | tspack | ) | const |
Definition at line 52 of file spectrum.cpp.
References c, lux::SpectrumWavelengths::cie_Y, Scalar, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, lux::TsPack::swl, and WAVELENGTH_SAMPLES.
Referenced by lux::Lafortune::Pdf(), and lux::Lafortune::Sample_f().
friend class boost::serialization::access [friend] |
Definition at line 40 of file spectrum.h.
SWCSpectrum Exp | ( | const SWCSpectrum & | s | ) | [friend] |
Definition at line 156 of file spectrum.h.
friend class lux::ParamSet [friend] |
Definition at line 186 of file spectrum.h.
SWCSpectrum operator* | ( | Scalar | a, | |
const SWCSpectrum & | s | |||
) | [friend] |
Definition at line 112 of file spectrum.h.
ostream& operator<< | ( | ostream & | , | |
const SWCSpectrum & | ||||
) | [friend] |
Scalar lux::SWCSpectrum::c[WAVELENGTH_SAMPLES] |
Definition at line 189 of file spectrum.h.
Referenced by AddWeighted(), lux::BasicColorPhoton::BasicColorPhoton(), Black(), lux::SkyLight::ChromaticityToSpectrum(), Clamp(), Filter(), lux::BasicColorPhoton::GetSWCSpectrum(), lux::VirtualLight::GetSWCSpectrum(), IsNaN(), lux::BasicColorPhoton::load(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator==(), PhaseDifference(), Pow(), Print(), lux::SpectrumWavelengths::Sample(), lux::BasicColorPhoton::save(), serialize(), Sqrt(), SWCSpectrum(), ToXYZ(), and Y().