Class response_t

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class response_t : public wt::scene::scene_element_t

Sensor’s response function. This is responsible to transform spectral samples to film pixel data. f() converts spectral samples are converted to power values using the sensor’s sensitivity spectrum for each channel. An optional tonemapping operator, get_tonemap(), transforms the final multichannel data using some mapping, e.g., gamma correction.

Subclassed by wt::sensor::response::RGB_t, wt::sensor::response::XYZ_t, wt::sensor::response::monochromatic_t, wt::sensor::response::multichannel_t

Public Functions

inline response_t(std::string id, std::shared_ptr<tonemap_t> &&tonemap)
response_t(const response_t&) = default
response_t(response_t&&) = default
virtual ~response_t() noexcept = default
inline const auto &get_tonemap() const noexcept
virtual bitmap::pixel_layout_t pixel_layout() const noexcept = 0

Returns the sensor’s pixel layout.

inline auto channels() const noexcept

Returns number of channels in the sensor’s pixel layout.

virtual const f_t f(std::uint32_t channel, const wavenumber_t &k) const noexcept = 0

Evaluates the sensor sensitivity function.

virtual const spectrum::spectrum_real_t &sensitivity() const noexcept = 0

Returns the sensor’s sensitivity spectrum (the sum of all channels’ response spectra)

Public Static Functions

static inline constexpr std::string scene_element_class() noexcept
static std::unique_ptr<response_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)