Class texture_t¶
Defined in File texture.hpp
Inheritance Relationships¶
Base Type¶
public wt::scene::scene_element_t
(Class scene_element_t)
Derived Types¶
public wt::texture::bitmap_t
(Class bitmap_t)public wt::texture::checkerboard_t
(Class checkerboard_t)public wt::texture::constant_t
(Class constant_t)public wt::texture::function_t
(Class function_t)public wt::texture::mix_t
(Class mix_t)public wt::texture::scale_t
(Class scale_t)public wt::texture::transform_t
(Class transform_t)
Class Documentation¶
-
class texture_t : public wt::scene::scene_element_t¶
Generic texture interface.
Subclassed by wt::texture::bitmap_t, wt::texture::checkerboard_t, wt::texture::constant_t, wt::texture::function_t, wt::texture::mix_t, wt::texture::scale_t, wt::texture::transform_t
Public Functions
-
inline texture_t(std::string id)¶
-
virtual ~texture_t() noexcept = default¶
-
inline virtual bool needs_interaction_footprint() const noexcept¶
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_real_t> mean_spectrum() const noexcept = 0¶
Average spectrum of the texture. Returns
nullptr
when an average spectrum cannot be computed.
-
virtual std::optional<f_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 vec4_t get_RGBA(const texture_query_t &query) const noexcept = 0¶
Samples the texture. Returns filtered RGBA data, without spectral upsampling. Ignores
query.k
. Only relevant for some textures.- Returns:
RGB triplet and alpha (if any).
-
virtual vec2_t f(const texture_query_t &query) const noexcept = 0¶
Samples the texture. Returns spectrally upsampled (to wavenumber
query.k
) result.- Returns:
Spectral luminance value and alpha (if any) pair.
-
inline texture_t(std::string id)¶