Class complex_t

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class complex_t : public wt::scene::scene_element_t

Generic (complex-valued) texture.

Subclassed by wt::texture::complex_constant_t, wt::texture::complex_container_t

Public Functions

inline complex_t(std::string id)
complex_t(complex_t&&) = default
virtual ~complex_t() noexcept = default
virtual bool needs_interaction_footprint() const noexcept = 0

Returns TRUE for textures that make use of the surface interaction footprint data.

virtual vec2_t resolution() const noexcept = 0

Returns texture resolution represented via \( \frac{\text{texels}}{\vec{uv}} \). May return an approximation. Can be infinite, e.g., for analytic textures. Can be 1, for constant textures.

inline bool is_constant() const noexcept

Returns TRUE for textures that are constant, i.e. admit a resolution() of exactly 1.

virtual std::shared_ptr<spectrum::spectrum_t> mean_spectrum() const noexcept = 0

Average spectrum of the texture. Returns nullptr when an average spectrum cannot be computed.

virtual std::optional<c_t> mean_value(wavenumber_t k) const noexcept = 0

Average value of the texture. Returns std::nullopt when an average value cannot be computed.

virtual c_t f(const texture_query_t &query) const noexcept = 0

Samples the texture.

Public Static Functions

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