tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
tpbrt::texture Struct Reference

C++ wrapper for tpbrt_texture_t. More...

#include <tinypbrt/detail/cpp/texture.hpp>

Public Types

using mapping_variant_type = detail::optional_variant< texture_mapping_uv_params, texture_mapping_spherical_params, texture_mapping_cylindrical_params, texture_mapping_planar_params >
 Type used for better reading mapping tagged union of parameters.
 

Public Member Functions

constexpr texture_idx_t idx () const noexcept
 Returns idx value.
 
constexpr string name () const noexcept
 Returns name value.
 
constexpr texture_type type () const noexcept
 Returns type value.
 
constexpr texture_class tex_class () const noexcept
 Returns tex_class value.
 
constexpr bool_t is_bilerp () const noexcept
 Returns true if type is bilerp.
 
constexpr bool_t is_checkerboard () const noexcept
 Returns true if type is checkerboard.
 
constexpr bool_t is_constant () const noexcept
 Returns true if type is constant.
 
constexpr bool_t is_direction_mix () const noexcept
 Returns true if type is direction_mix.
 
constexpr bool_t is_dots () const noexcept
 Returns true if type is dots.
 
constexpr bool_t is_fbm () const noexcept
 Returns true if type is fbm.
 
constexpr bool_t is_wrinkled () const noexcept
 Returns true if type is wrinkled.
 
constexpr bool_t is_windy () const noexcept
 Returns true if type is windy.
 
constexpr bool_t is_image_map () const noexcept
 Returns true if type is image_map.
 
constexpr bool_t is_marble () const noexcept
 Returns true if type is marble.
 
constexpr bool_t is_mix () const noexcept
 Returns true if type is mix.
 
constexpr bool_t is_ptex () const noexcept
 Returns true if type is ptex.
 
constexpr bool_t is_scale () const noexcept
 Returns true if type is scale.
 
constexpr std::optional< texture_bilerp_params > as_bilerp () const noexcept
 Returns texture parameters as bilerp.
 
constexpr std::optional< texture_checkerboard_params > as_checkerboard () const noexcept
 Returns texture parameters as checkerboard.
 
constexpr std::optional< texture_constant_params > as_constant () const noexcept
 Returns texture parameters as constant.
 
constexpr std::optional< texture_direction_mix_params > as_direction_mix () const noexcept
 Returns texture parameters as direction_mix.
 
constexpr std::optional< texture_dots_params > as_dots () const noexcept
 Returns texture parameters as dots.
 
constexpr std::optional< texture_fbm_params > as_fbm () const noexcept
 Returns texture parameters as fbm.
 
constexpr std::optional< texture_wrinkled_params > as_wrinkled () const noexcept
 Returns texture parameters as wrinkled.
 
constexpr std::optional< texture_windy_params > as_windy () const noexcept
 Returns texture parameters as windy.
 
constexpr std::optional< texture_image_map_params > as_image_map () const noexcept
 Returns texture parameters as image_map.
 
constexpr std::optional< texture_marble_params > as_marble () const noexcept
 Returns texture parameters as marble.
 
constexpr std::optional< texture_mix_params > as_mix () const noexcept
 Returns texture parameters as mix.
 
constexpr std::optional< texture_ptex_params > as_ptex () const noexcept
 Returns texture parameters as ptex.
 
constexpr std::optional< texture_scale_params > as_scale () const noexcept
 Returns texture parameters as scale.
 
constexpr variant_type to_variant () const noexcept
 Conversion to variant.
 
constexpr texture_mapping mapping () const noexcept
 Returns mapping value.
 
constexpr bool_t is_mapping_uv () const noexcept
 Returns true if type is uv.
 
constexpr bool_t is_mapping_spherical () const noexcept
 Returns true if type is spherical.
 
constexpr bool_t is_mapping_cylindrical () const noexcept
 Returns true if type is cylindrical.
 
constexpr bool_t is_mapping_planar () const noexcept
 Returns true if type is planar.
 
constexpr std::optional< texture_mapping_uv_params > mapping_as_uv () const noexcept
 Returns texture mapping parameters as uv.
 
constexpr std::optional< texture_mapping_spherical_params > mapping_as_spherical () const noexcept
 Returns texture mapping parameters as spherical.
 
constexpr std::optional< texture_mapping_cylindrical_params > mapping_as_cylindrical () const noexcept
 Returns texture mapping parameters as cylindrical.
 
constexpr std::optional< texture_mapping_planar_params > mapping_as_planar () const noexcept
 Returns texture mapping parameters as planar.
 
constexpr mapping_variant_type mapping_to_variant () const noexcept
 Conversion to variant.
 
template<class Visitor >
constexpr auto visit_mapping (Visitor &&visitor) const
 Visits mapping parameters.
 
constexpr auto reflect () const noexcept
 Conversion to tuple.
 

Detailed Description

Member Typedef Documentation

◆ mapping_variant_type

Type used for better reading mapping tagged union of parameters.

Member Function Documentation

◆ idx()

constexpr texture_idx_t tpbrt::texture::idx ( ) const
inlineconstexprnoexcept

Returns idx value.

◆ name()

constexpr string tpbrt::texture::name ( ) const
inlineconstexprnoexcept

Returns name value.

◆ type()

constexpr texture_type tpbrt::texture::type ( ) const
inlineconstexprnoexcept

Returns type value.

◆ tex_class()

constexpr texture_class tpbrt::texture::tex_class ( ) const
inlineconstexprnoexcept

Returns tex_class value.

◆ is_bilerp()

constexpr bool_t tpbrt::texture::is_bilerp ( ) const
inlineconstexprnoexcept

Returns true if type is bilerp.

◆ is_checkerboard()

constexpr bool_t tpbrt::texture::is_checkerboard ( ) const
inlineconstexprnoexcept

Returns true if type is checkerboard.

◆ is_constant()

constexpr bool_t tpbrt::texture::is_constant ( ) const
inlineconstexprnoexcept

Returns true if type is constant.

◆ is_direction_mix()

constexpr bool_t tpbrt::texture::is_direction_mix ( ) const
inlineconstexprnoexcept

Returns true if type is direction_mix.

◆ is_dots()

constexpr bool_t tpbrt::texture::is_dots ( ) const
inlineconstexprnoexcept

Returns true if type is dots.

◆ is_fbm()

constexpr bool_t tpbrt::texture::is_fbm ( ) const
inlineconstexprnoexcept

Returns true if type is fbm.

◆ is_wrinkled()

constexpr bool_t tpbrt::texture::is_wrinkled ( ) const
inlineconstexprnoexcept

Returns true if type is wrinkled.

◆ is_windy()

constexpr bool_t tpbrt::texture::is_windy ( ) const
inlineconstexprnoexcept

Returns true if type is windy.

◆ is_image_map()

constexpr bool_t tpbrt::texture::is_image_map ( ) const
inlineconstexprnoexcept

Returns true if type is image_map.

◆ is_marble()

constexpr bool_t tpbrt::texture::is_marble ( ) const
inlineconstexprnoexcept

Returns true if type is marble.

◆ is_mix()

constexpr bool_t tpbrt::texture::is_mix ( ) const
inlineconstexprnoexcept

Returns true if type is mix.

◆ is_ptex()

constexpr bool_t tpbrt::texture::is_ptex ( ) const
inlineconstexprnoexcept

Returns true if type is ptex.

◆ is_scale()

constexpr bool_t tpbrt::texture::is_scale ( ) const
inlineconstexprnoexcept

Returns true if type is scale.

◆ as_bilerp()

constexpr std::optional< texture_bilerp_params > tpbrt::texture::as_bilerp ( ) const
inlineconstexprnoexcept

Returns texture parameters as bilerp.

◆ as_checkerboard()

constexpr std::optional< texture_checkerboard_params > tpbrt::texture::as_checkerboard ( ) const
inlineconstexprnoexcept

Returns texture parameters as checkerboard.

◆ as_constant()

constexpr std::optional< texture_constant_params > tpbrt::texture::as_constant ( ) const
inlineconstexprnoexcept

Returns texture parameters as constant.

◆ as_direction_mix()

constexpr std::optional< texture_direction_mix_params > tpbrt::texture::as_direction_mix ( ) const
inlineconstexprnoexcept

Returns texture parameters as direction_mix.

◆ as_dots()

constexpr std::optional< texture_dots_params > tpbrt::texture::as_dots ( ) const
inlineconstexprnoexcept

Returns texture parameters as dots.

◆ as_fbm()

constexpr std::optional< texture_fbm_params > tpbrt::texture::as_fbm ( ) const
inlineconstexprnoexcept

Returns texture parameters as fbm.

◆ as_wrinkled()

constexpr std::optional< texture_wrinkled_params > tpbrt::texture::as_wrinkled ( ) const
inlineconstexprnoexcept

Returns texture parameters as wrinkled.

◆ as_windy()

constexpr std::optional< texture_windy_params > tpbrt::texture::as_windy ( ) const
inlineconstexprnoexcept

Returns texture parameters as windy.

◆ as_image_map()

constexpr std::optional< texture_image_map_params > tpbrt::texture::as_image_map ( ) const
inlineconstexprnoexcept

Returns texture parameters as image_map.

◆ as_marble()

constexpr std::optional< texture_marble_params > tpbrt::texture::as_marble ( ) const
inlineconstexprnoexcept

Returns texture parameters as marble.

◆ as_mix()

constexpr std::optional< texture_mix_params > tpbrt::texture::as_mix ( ) const
inlineconstexprnoexcept

Returns texture parameters as mix.

◆ as_ptex()

constexpr std::optional< texture_ptex_params > tpbrt::texture::as_ptex ( ) const
inlineconstexprnoexcept

Returns texture parameters as ptex.

◆ as_scale()

constexpr std::optional< texture_scale_params > tpbrt::texture::as_scale ( ) const
inlineconstexprnoexcept

Returns texture parameters as scale.

◆ to_variant()

constexpr variant_type tpbrt::texture::to_variant ( ) const
inlineconstexprnoexcept

Conversion to variant.

◆ mapping()

constexpr texture_mapping tpbrt::texture::mapping ( ) const
inlineconstexprnoexcept

Returns mapping value.

◆ is_mapping_uv()

constexpr bool_t tpbrt::texture::is_mapping_uv ( ) const
inlineconstexprnoexcept

Returns true if type is uv.

◆ is_mapping_spherical()

constexpr bool_t tpbrt::texture::is_mapping_spherical ( ) const
inlineconstexprnoexcept

Returns true if type is spherical.

◆ is_mapping_cylindrical()

constexpr bool_t tpbrt::texture::is_mapping_cylindrical ( ) const
inlineconstexprnoexcept

Returns true if type is cylindrical.

◆ is_mapping_planar()

constexpr bool_t tpbrt::texture::is_mapping_planar ( ) const
inlineconstexprnoexcept

Returns true if type is planar.

◆ mapping_as_uv()

constexpr std::optional< texture_mapping_uv_params > tpbrt::texture::mapping_as_uv ( ) const
inlineconstexprnoexcept

Returns texture mapping parameters as uv.

◆ mapping_as_spherical()

constexpr std::optional< texture_mapping_spherical_params > tpbrt::texture::mapping_as_spherical ( ) const
inlineconstexprnoexcept

Returns texture mapping parameters as spherical.

◆ mapping_as_cylindrical()

constexpr std::optional< texture_mapping_cylindrical_params > tpbrt::texture::mapping_as_cylindrical ( ) const
inlineconstexprnoexcept

Returns texture mapping parameters as cylindrical.

◆ mapping_as_planar()

constexpr std::optional< texture_mapping_planar_params > tpbrt::texture::mapping_as_planar ( ) const
inlineconstexprnoexcept

Returns texture mapping parameters as planar.

◆ mapping_to_variant()

constexpr mapping_variant_type tpbrt::texture::mapping_to_variant ( ) const
inlineconstexprnoexcept

Conversion to variant.

◆ visit_mapping()

template<class Visitor >
constexpr auto tpbrt::texture::visit_mapping ( Visitor &&  visitor) const
inlineconstexpr

Visits mapping parameters.

◆ reflect()

constexpr auto tpbrt::texture::reflect ( ) const
inlineconstexprnoexcept

Conversion to tuple.


The documentation for this struct was generated from the following file: