#include <spectrum.h>
Public Member Functions | |
SWCSpectrum (Scalar v=0.f) | |
SWCSpectrum (Spectrum s) | |
SWCSpectrum (const SPD *s) | |
SWCSpectrum (float cs[WAVELENGTH_SAMPLES]) | |
SWCSpectrum & | operator+= (const SWCSpectrum &s2) |
SWCSpectrum | operator+ (const SWCSpectrum &s2) const |
SWCSpectrum | operator- (const SWCSpectrum &s2) const |
SWCSpectrum | operator/ (const SWCSpectrum &s2) const |
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 |
Scalar | y () const |
Scalar | filter () const |
bool | operator< (const SWCSpectrum &s2) 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 432 of file spectrum.h.
lux::SWCSpectrum::SWCSpectrum | ( | Scalar | v = 0.f |
) | [inline] |
SWCSpectrum::SWCSpectrum | ( | Spectrum | s | ) |
Definition at line 123 of file spectrum.cpp.
References AddWeighted(), c, lux::Spectrum::c, blender::g, 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, thread_wavelengths, and WAVELENGTH_SAMPLES.
SWCSpectrum::SWCSpectrum | ( | const SPD * | s | ) |
Definition at line 116 of file spectrum.cpp.
References c, lux::SPD::sample(), thread_wavelengths, lux::SpectrumWavelengths::w, and WAVELENGTH_SAMPLES.
lux::SWCSpectrum::SWCSpectrum | ( | float | cs[WAVELENGTH_SAMPLES] | ) | [inline] |
void lux::SWCSpectrum::AddWeighted | ( | Scalar | w, | |
const SWCSpectrum & | s | |||
) | [inline] |
Definition at line 507 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by SWCSpectrum().
bool lux::SWCSpectrum::Black | ( | ) | const [inline] |
Definition at line 519 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::EstimateDirect(), lux::BidirIntegrator::evalPath(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::SingleScattering::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::BidirIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), lux::ExPhotonIntegrator::Preprocess(), lux::RenderThread::render(), lux::BSDF::Sample_f(), and lux::VisibilityTester::TestOcclusion().
SWCSpectrum lux::SWCSpectrum::Clamp | ( | Scalar | low = 0.f , |
|
Scalar | high = INFINITY | |||
) | const [inline] |
Definition at line 548 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::FresnelApproxEta(), and lux::FresnelApproxK().
Scalar SWCSpectrum::filter | ( | ) | const |
Definition at line 102 of file spectrum.cpp.
References c, lux::inv_WAVELENGTH_SAMPLES, Scalar, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, thread_wavelengths, and WAVELENGTH_SAMPLES.
Referenced by generateLightPath(), lux::BidirIntegrator::generatePath(), lux::SingleScattering::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::EmissionIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), and lux::ExPhotonIntegrator::Preprocess().
bool lux::SWCSpectrum::IsNaN | ( | ) | const [inline] |
Definition at line 555 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::ParticleTracingIntegrator::Li().
bool lux::SWCSpectrum::operator!= | ( | const SWCSpectrum & | sp | ) | const [inline] |
Definition at line 516 of file spectrum.h.
SWCSpectrum lux::SWCSpectrum::operator* | ( | Scalar | a | ) | const [inline] |
SWCSpectrum lux::SWCSpectrum::operator* | ( | const SWCSpectrum & | sp | ) | const [inline] |
SWCSpectrum& lux::SWCSpectrum::operator*= | ( | Scalar | a | ) | [inline] |
SWCSpectrum& lux::SWCSpectrum::operator*= | ( | const SWCSpectrum & | sp | ) | [inline] |
SWCSpectrum lux::SWCSpectrum::operator+ | ( | const SWCSpectrum & | s2 | ) | const [inline] |
SWCSpectrum& lux::SWCSpectrum::operator+= | ( | const SWCSpectrum & | s2 | ) | [inline] |
SWCSpectrum lux::SWCSpectrum::operator- | ( | ) | const [inline] |
SWCSpectrum lux::SWCSpectrum::operator- | ( | const SWCSpectrum & | s2 | ) | const [inline] |
SWCSpectrum lux::SWCSpectrum::operator/ | ( | Scalar | a | ) | const [inline] |
Definition at line 498 of file spectrum.h.
SWCSpectrum lux::SWCSpectrum::operator/ | ( | const SWCSpectrum & | s2 | ) | const [inline] |
SWCSpectrum& lux::SWCSpectrum::operator/= | ( | Scalar | a | ) | [inline] |
bool lux::SWCSpectrum::operator< | ( | const SWCSpectrum & | s2 | ) | const [inline] |
bool lux::SWCSpectrum::operator== | ( | const SWCSpectrum & | sp | ) | const [inline] |
SWCSpectrum lux::SWCSpectrum::Pow | ( | const SWCSpectrum & | e | ) | const [inline] |
Definition at line 530 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::Lafortune::f().
void lux::SWCSpectrum::Print | ( | FILE * | f | ) | const [inline] |
void lux::SWCSpectrum::serialize | ( | Archive & | ar, | |
const unsigned int | version | |||
) | [inline, private] |
SWCSpectrum lux::SWCSpectrum::Sqrt | ( | ) | const [inline] |
Definition at line 524 of file spectrum.h.
References c, and WAVELENGTH_SAMPLES.
Referenced by lux::FresnelApproxEta(), and lux::FresnelApproxK().
XYZColor SWCSpectrum::ToXYZ | ( | ) | const |
Definition at line 63 of file spectrum.cpp.
References c, lux::SpectrumWavelengths::cie_X, lux::SpectrumWavelengths::cie_Y, lux::SpectrumWavelengths::cie_Z, lux::inv_WAVELENGTH_SAMPLES, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, thread_wavelengths, and WAVELENGTH_SAMPLES.
Referenced by lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::ExPhotonIntegrator::Li(), and lux::BidirIntegrator::Li().
Scalar SWCSpectrum::y | ( | ) | const |
Definition at line 86 of file spectrum.cpp.
References c, lux::SpectrumWavelengths::cie_Y, lux::inv_WAVELENGTH_SAMPLES, Scalar, lux::SpectrumWavelengths::single, lux::SpectrumWavelengths::single_w, thread_wavelengths, and WAVELENGTH_SAMPLES.
Referenced by lux::SkyLight::GetSkySpectralRadiance(), operator<(), lux::Lafortune::Pdf(), lux::Lafortune::Sample_f(), and lux::WeightedSampleOneLight().
friend class boost::serialization::access [friend] |
Definition at line 433 of file spectrum.h.
SWCSpectrum Exp | ( | const SWCSpectrum & | s | ) | [friend] |
Definition at line 542 of file spectrum.h.
friend class lux::ParamSet [friend] |
Definition at line 571 of file spectrum.h.
SWCSpectrum operator* | ( | Scalar | a, | |
const SWCSpectrum & | s | |||
) | [friend] |
Definition at line 495 of file spectrum.h.
ostream& operator<< | ( | ostream & | , | |
const SWCSpectrum & | ||||
) | [friend] |
Scalar lux::SWCSpectrum::c[WAVELENGTH_SAMPLES] |
Definition at line 574 of file spectrum.h.
Referenced by AddWeighted(), Black(), lux::SkyLight::ChromaticityToSpectrum(), Clamp(), filter(), IsNaN(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator/(), operator/=(), operator==(), Pow(), Print(), lux::SpectrumWavelengths::Sample(), serialize(), Sqrt(), SWCSpectrum(), ToXYZ(), and y().