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

Data Structures

struct  tpbrt::texture_handle
 C++ wrapper for tpbrt_texture_handle_t. More...
 
struct  tpbrt::texture_bilerp_params
 C++ wrapper for tpbrt_texture_bilerp_params_t. More...
 
struct  tpbrt::texture_checkerboard_params
 C++ wrapper for tpbrt_texture_checkerboard_params_t. More...
 
struct  tpbrt::texture_constant_params
 C++ wrapper for tpbrt_texture_constant_params_t. More...
 
struct  tpbrt::texture_direction_mix_params
 C++ wrapper for tpbrt_texture_direction_mix_params_t. More...
 
struct  tpbrt::texture_dots_params
 C++ wrapper for tpbrt_texture_dots_params_t. More...
 
struct  tpbrt::texture_noise_params< Class >
 C++ wrapper for tpbrt_texture_fbm_params_t, shared by the fbm, wrinkled and windy textures. More...
 
struct  tpbrt::texture_image_map_params
 C++ wrapper for tpbrt_texture_image_map_params_t. More...
 
struct  tpbrt::texture_marble_params
 C++ wrapper for tpbrt_texture_marble_params_t. More...
 
struct  tpbrt::texture_mix_params
 C++ wrapper for tpbrt_texture_mix_params_t. More...
 
struct  tpbrt::texture_ptex_params
 C++ wrapper for tpbrt_texture_ptex_params_t. More...
 
struct  tpbrt::texture_scale_params
 C++ wrapper for tpbrt_texture_scale_params_t. More...
 
struct  tpbrt::texture_mapping_uv_params
 C++ wrapper for tpbrt_texture_mapping_uv_params_t. More...
 
struct  tpbrt::texture_mapping_transform_params< Mapping >
 C++ wrapper for tpbrt_texture_mapping_spherical_params_t, shared by the spherical and cylindrical mappings. More...
 
struct  tpbrt::texture_mapping_planar_params
 C++ wrapper for tpbrt_texture_mapping_planar_params_t. More...
 
struct  tpbrt::texture
 C++ wrapper for tpbrt_texture_t. More...
 
struct  tpbrt::textures_list
 C++ wrapper for tpbrt_textures_list_t. More...
 

Typedefs

using tpbrt::texture_idx_t = tpbrt_texture_idx_t
 Texture index type.
 
using tpbrt::texture_fbm_params = texture_noise_params< texture_class::FBM >
 C++ wrapper for tpbrt_texture_fbm_params_t.
 
using tpbrt::texture_wrinkled_params = texture_noise_params< texture_class::WRINKLED >
 C++ wrapper for tpbrt_texture_wrinkled_params_t.
 
using tpbrt::texture_windy_params = texture_noise_params< texture_class::WINDY >
 C++ wrapper for tpbrt_texture_windy_params_t.
 
using tpbrt::texture_mapping_spherical_params = texture_mapping_transform_params< texture_mapping::SPHERICAL >
 C++ wrapper for tpbrt_texture_mapping_spherical_params_t.
 
using tpbrt::texture_mapping_cylindrical_params = texture_mapping_transform_params< texture_mapping::CYLINDRICAL >
 C++ wrapper for tpbrt_texture_mapping_cylindrical_params_t.
 

Enumerations

enum class  tpbrt::texture_handle_value_type : uchar_t { tpbrt::texture_handle_value_type::TEXTURE_IDX = TPBRT_TEXTURE_HANDLE_VALUE_TYPE_TEXTURE_IDX , tpbrt::texture_handle_value_type::SPECTRUM = TPBRT_TEXTURE_HANDLE_VALUE_TYPE_SPECTRUM , tpbrt::texture_handle_value_type::MAX_NUM = TPBRT_TEXTURE_HANDLE_VALUE_TYPE_MAX_NUM }
 Texture handle value types. More...
 
enum class  tpbrt::texture_type : uchar_t { tpbrt::texture_type::FLOAT = TPBRT_TEXTURE_TYPE_FLOAT , tpbrt::texture_type::SPECTRUM = TPBRT_TEXTURE_TYPE_SPECTRUM , tpbrt::texture_type::MAX_NUM = TPBRT_TEXTURE_TYPE_MAX_NUM }
 Textures types. More...
 
enum class  tpbrt::texture_class : uchar_t {
  tpbrt::texture_class::BILERP = TPBRT_TEXTURE_CLASS_BILERP , tpbrt::texture_class::CHECKER_BOARD = TPBRT_TEXTURE_CLASS_CHECKER_BOARD , tpbrt::texture_class::CONSTANT = TPBRT_TEXTURE_CLASS_CONSTANT , tpbrt::texture_class::DIRECTION_MIX = TPBRT_TEXTURE_CLASS_DIRECTION_MIX ,
  tpbrt::texture_class::DOTS = TPBRT_TEXTURE_CLASS_DOTS , tpbrt::texture_class::FBM = TPBRT_TEXTURE_CLASS_FBM , tpbrt::texture_class::IMAGE_MAP = TPBRT_TEXTURE_CLASS_IMAGE_MAP , tpbrt::texture_class::MARBLE = TPBRT_TEXTURE_CLASS_MARBLE ,
  tpbrt::texture_class::MIX = TPBRT_TEXTURE_CLASS_MIX , tpbrt::texture_class::PTEX = TPBRT_TEXTURE_CLASS_PTEX , tpbrt::texture_class::SCALE = TPBRT_TEXTURE_CLASS_SCALE , tpbrt::texture_class::WINDY = TPBRT_TEXTURE_CLASS_WINDY ,
  tpbrt::texture_class::WRINKLED = TPBRT_TEXTURE_CLASS_WRINKLED , tpbrt::texture_class::MAX_NUM = TPBRT_TEXTURE_CLASS_MAX_NUM
}
 Texture classes. More...
 
enum class  tpbrt::texture_wrap : uchar_t { tpbrt::texture_wrap::REPEAT = TPBRT_TEXTURE_WRAP_REPEAT , tpbrt::texture_wrap::BLACK = TPBRT_TEXTURE_WRAP_BLACK , tpbrt::texture_wrap::CLAMP = TPBRT_TEXTURE_WRAP_CLAMP , tpbrt::texture_wrap::MAX_NUM = TPBRT_TEXTURE_WRAP_MAX_NUM }
 Texture wrap types. More...
 
enum class  tpbrt::texture_filter : uchar_t {
  tpbrt::texture_filter::BILINEAR = TPBRT_TEXTURE_FILTER_BILINEAR , tpbrt::texture_filter::EWA = TPBRT_TEXTURE_FILTER_EWA , tpbrt::texture_filter::TRILINEAR = TPBRT_TEXTURE_FILTER_TRILINEAR , tpbrt::texture_filter::POINT = TPBRT_TEXTURE_FILTER_POINT ,
  tpbrt::texture_filter::MAX_NUM = TPBRT_TEXTURE_FILTER_MAX_NUM
}
 Texture filter types. More...
 
enum class  tpbrt::texture_encoding : uchar_t { tpbrt::texture_encoding::SRGB = TPBRT_TEXTURE_ENCODING_SRGB , tpbrt::texture_encoding::LINEAR = TPBRT_TEXTURE_ENCODING_LINEAR , tpbrt::texture_encoding::GAMMA = TPBRT_TEXTURE_ENCODING_GAMMA , tpbrt::texture_encoding::MAX_NUM = TPBRT_TEXTURE_ENCODING_MAX_NUM }
 Texture encoding types. More...
 
enum class  tpbrt::texture_mapping : uchar_t {
  tpbrt::texture_mapping::UV = TPBRT_TEXTURE_MAPPING_UV , tpbrt::texture_mapping::SPHERICAL = TPBRT_TEXTURE_MAPPING_SPHERICAL , tpbrt::texture_mapping::CYLINDRICAL = TPBRT_TEXTURE_MAPPING_CYLINDRICAL , tpbrt::texture_mapping::PLANAR = TPBRT_TEXTURE_MAPPING_PLANAR ,
  tpbrt::texture_mapping::MAX_NUM = TPBRT_TEXTURE_MAPPING_MAX_NUM
}
 Texture mapping types. More...
 

Functions

constexpr std::string_view tpbrt::to_string (const texture_handle_value_type type) noexcept
 Converts texture_handle_value_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_type type) noexcept
 Converts texture_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_class class_val) noexcept
 Converts texture_class enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_wrap wrap) noexcept
 Converts texture_wrap enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_filter filter) noexcept
 Converts texture_filter enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_encoding encoding) noexcept
 Converts texture_encoding enum value to string.
 
constexpr std::string_view tpbrt::to_string (const texture_mapping mapping) noexcept
 Converts texture_mapping enum value to string.
 
result< texture > tpbrt::get_texture (const textures_list list, const texture_handle handle) noexcept
 Returns texture to which handle is provided.
 
result< texture > tpbrt::get_texture (const textures_list list, const std::string_view name) noexcept
 Returns texture with given name.
 

Variables

constexpr auto tpbrt::TextureInvalidIdx = TPBRT_TEXTURE_IDX_INVALID
 Invalid texture index.
 

Detailed Description

Typedef Documentation

◆ texture_idx_t

Texture index type.

◆ texture_fbm_params

◆ texture_wrinkled_params

C++ wrapper for tpbrt_texture_wrinkled_params_t.

◆ texture_windy_params

C++ wrapper for tpbrt_texture_windy_params_t.

◆ texture_mapping_spherical_params

◆ texture_mapping_cylindrical_params

C++ wrapper for tpbrt_texture_mapping_cylindrical_params_t.

Enumeration Type Documentation

◆ texture_handle_value_type

Texture handle value types.

Enumerator
TEXTURE_IDX 

Texture index.

SPECTRUM 

Spectrum.

MAX_NUM 

Count of available texture handle value types.

◆ texture_type

enum class tpbrt::texture_type : uchar_t
strong

Textures types.

Enumerator
FLOAT 

Float texture.

SPECTRUM 

Spectrum texture.

MAX_NUM 

Count of available texture types.

◆ texture_class

enum class tpbrt::texture_class : uchar_t
strong

Texture classes.

Enumerator
BILERP 

Bilerp texture.

CHECKER_BOARD 

Checker board texture.

CONSTANT 

Constant texture.

DIRECTION_MIX 

Direction mix texture.

DOTS 

Dots texture.

FBM 

FBM texture.

IMAGE_MAP 

Image map texture.

MARBLE 

Marble texture.

MIX 

Mix texture.

PTEX 

PTEX texture.

SCALE 

Scale texture.

WINDY 

Windy texture.

WRINKLED 

Wrinkled texture.

MAX_NUM 

Count of available texture classes.

◆ texture_wrap

enum class tpbrt::texture_wrap : uchar_t
strong

Texture wrap types.

Enumerator
REPEAT 

Simply tiles the texture.

BLACK 

Returns black when outside the legal range.

CLAMP 

Always returns the nearest border texel.

MAX_NUM 

Count of available texture wrap types.

◆ texture_filter

enum class tpbrt::texture_filter : uchar_t
strong

Texture filter types.

Enumerator
BILINEAR 

Does bilinear sampling of a single MIP level.

EWA 

Uses the high quality but much slower elliptically weighted average algorithm.

TRILINEAR 

Does trilinear interpolation between two MIP levels.

POINT 

Point sampling.

MAX_NUM 

Count of available texture filter types.

◆ texture_encoding

enum class tpbrt::texture_encoding : uchar_t
strong

Texture encoding types.

Enumerator
SRGB 

Applies the sRGB nonlinear mapping.

LINEAR 

Directly maps them, dividing their values by 255.

GAMMA 

Applies a gamma correction curve with the specified exponent.

MAX_NUM 

Count of available texture encoding types.

◆ texture_mapping

enum class tpbrt::texture_mapping : uchar_t
strong

Texture mapping types.

Enumerator
UV 

Based on the surface's (u,v) parameterization.

SPHERICAL 

Spherical mapping.

CYLINDRICAL 

Cylindrical mapping.

PLANAR 

Planar mapping.

MAX_NUM 

Count of available texture mapping types.

Function Documentation

◆ to_string() [1/7]

constexpr std::string_view tpbrt::to_string ( const texture_handle_value_type  type)
constexprnoexcept

Converts texture_handle_value_type enum value to string.

Parameters
typeTexture handle value type.
Returns
String value of texture handle value type.

◆ to_string() [2/7]

constexpr std::string_view tpbrt::to_string ( const texture_type  type)
constexprnoexcept

Converts texture_type enum value to string.

Parameters
typeTexture type.
Returns
String value of texture type.

◆ to_string() [3/7]

constexpr std::string_view tpbrt::to_string ( const texture_class  class_val)
constexprnoexcept

Converts texture_class enum value to string.

Parameters
class_valTexture class.
Returns
String value of texture class.

◆ to_string() [4/7]

constexpr std::string_view tpbrt::to_string ( const texture_wrap  wrap)
constexprnoexcept

Converts texture_wrap enum value to string.

Parameters
wrapTexture wrap.
Returns
String value of texture wrap.

◆ to_string() [5/7]

constexpr std::string_view tpbrt::to_string ( const texture_filter  filter)
constexprnoexcept

Converts texture_filter enum value to string.

Parameters
filterTexture filter.
Returns
String value of texture filter.

◆ to_string() [6/7]

constexpr std::string_view tpbrt::to_string ( const texture_encoding  encoding)
constexprnoexcept

Converts texture_encoding enum value to string.

Parameters
encodingTexture encoding.
Returns
String value of texture encoding.

◆ to_string() [7/7]

constexpr std::string_view tpbrt::to_string ( const texture_mapping  mapping)
constexprnoexcept

Converts texture_mapping enum value to string.

Parameters
mappingTexture mapping.
Returns
String value of texture mapping.

◆ get_texture() [1/2]

result< texture > tpbrt::get_texture ( const textures_list  list,
const texture_handle  handle 
)
inlinenoexcept

Returns texture to which handle is provided.

Parameters
listList of textures in which texture given by handle should be.
handleHandle to texture.
Returns
Result with the texture or with error code (most likely error::NOT_FOUND).

◆ get_texture() [2/2]

result< texture > tpbrt::get_texture ( const textures_list  list,
const std::string_view  name 
)
inlinenoexcept

Returns texture with given name.

Parameters
listList of textures in which searched texture should be.
nameName of the searched texture.
Returns
Result with the texture or with error code (most likely error::NOT_FOUND).

Variable Documentation

◆ TextureInvalidIdx

constexpr auto tpbrt::TextureInvalidIdx = TPBRT_TEXTURE_IDX_INVALID
inlineconstexpr

Invalid texture index.