blackbody spectrum¶
-
class blackbody_t : public wt::spectrum::spectrum_real_t
Blackbody spectrum. Underneath, uses a tightly-sampled piece-wise linear distribution, enabling sampling support.
Public Functions
-
blackbody_t(std::string id, const temperature_t T, const range_t<wavelength_t> &wl_range, const f_t scale)
-
blackbody_t(const blackbody_t&) = default
-
blackbody_t(blackbody_t&&) = default
-
inline auto temperature() const noexcept
Temperature in Kelvin of the blackbody radiator.
-
inline auto locus_XYZ() const noexcept
Computes the Planckian locus in XYZ colourspace, i.e. the colour of a blackbody radiator.
- Returns:
vec3_t XYZ tristimulus colour
-
inline virtual const distribution1d_t *distribution() const noexcept override
Returns the underlying spectrum distribution.
-
inline virtual f_t power() const noexcept override
Returns the total spectral power contained in this spectrum.
-
inline virtual f_t power(const range_t<wavenumber_t> &wavenumbers) const noexcept override
Returns the spectral power over the provided wavenumber range.
-
inline virtual range_t<wavenumber_t> wavenumber_range() const noexcept override
Returns the range of wavenumbers for which this spectrum is defined. Querying the spectrum with wavenumber<range.min or wavenumber>range.max will always be 0.
-
inline virtual wavenumber_t mean_wavenumber() const noexcept override
Returns the mean wavenumber for this spectrum.
-
inline virtual f_t f(const wavenumber_t wavenumber) const noexcept override
Query the spectrum. Returns the spectral power for the given wavenumber ‘wavenumber’.
-
virtual scene::element::info_t description() const override
Public Static Functions
-
static std::unique_ptr<spectrum_real_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)
-
blackbody_t(std::string id, const temperature_t T, const range_t<wavelength_t> &wl_range, const f_t scale)