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::wavelength
 C++ wrapper for tpbrt_wavelength_t. More...
 
struct  tpbrt::blackbody
 C++ wrapper for tpbrt_blackbody_t (a separate type, so a blackbody spectrum is not confused with a constant one when visiting the spectrum variant - in C both are tpbrt_float_t). More...
 
struct  tpbrt::spectrum
 C++ wrapper for tpbrt_spectrum_t. More...
 

Typedefs

using tpbrt::rgb = vec3
 C++ wrapper for tpbrt_rgb_t.
 
using tpbrt::wavelength_array = array< tpbrt_wavelength_array_t, wavelength >
 C++ wrapper for tpbrt_wavelength_array_t.
 
using tpbrt::rgb_array = array< tpbrt_rgb_array_t, rgb >
 C++ wrapper for tpbrt_rgb_array_t.
 

Enumerations

enum class  tpbrt::color_space : uchar_t {
  tpbrt::color_space::ACES_2065_1 = TPBRT_COLOR_SPACE_ACES_2065_1 , tpbrt::color_space::REC_2020 = TPBRT_COLOR_SPACE_REC_2020 , tpbrt::color_space::DCI_P3 = TPBRT_COLOR_SPACE_DCI_P3 , tpbrt::color_space::SRGB = TPBRT_COLOR_SPACE_SRGB ,
  tpbrt::color_space::MAX_NUM = TPBRT_COLOR_SPACE_MAX_NUM
}
 Color space types. More...
 
enum class  tpbrt::spectrum_type : uchar_t {
  tpbrt::spectrum_type::WAVELENGTHS = TPBRT_SPECTRUM_TYPE_WAVELENGTHS , tpbrt::spectrum_type::RGB = TPBRT_SPECTRUM_TYPE_RGB , tpbrt::spectrum_type::BLACKBODY = TPBRT_SPECTRUM_TYPE_BLACKBODY , tpbrt::spectrum_type::FILE = TPBRT_SPECTRUM_TYPE_FILE ,
  tpbrt::spectrum_type::BUILTIN = TPBRT_SPECTRUM_TYPE_BUILTIN , tpbrt::spectrum_type::CONSTANT = TPBRT_SPECTRUM_TYPE_CONSTANT , tpbrt::spectrum_type::MAX_NUM = TPBRT_SPECTRUM_TYPE_MAX_NUM
}
 Spectrum value type. More...
 
enum class  tpbrt::spectrum_builtin : uchar_t {
  tpbrt::spectrum_builtin::GLASS_BK7 = TPBRT_SPECTRUM_BUILTIN_GLASS_BK7 , tpbrt::spectrum_builtin::GLASS_BAF10 = TPBRT_SPECTRUM_BUILTIN_GLASS_BAF10 , tpbrt::spectrum_builtin::GLASS_FK51A = TPBRT_SPECTRUM_BUILTIN_GLASS_FK51A , tpbrt::spectrum_builtin::GLASS_LASF9 = TPBRT_SPECTRUM_BUILTIN_GLASS_LASF9 ,
  tpbrt::spectrum_builtin::GLASS_F5 = TPBRT_SPECTRUM_BUILTIN_GLASS_F5 , tpbrt::spectrum_builtin::GLASS_F10 = TPBRT_SPECTRUM_BUILTIN_GLASS_F10 , tpbrt::spectrum_builtin::GLASS_F11 = TPBRT_SPECTRUM_BUILTIN_GLASS_F11 , tpbrt::spectrum_builtin::METAL_AG_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_AG_ETA ,
  tpbrt::spectrum_builtin::METAL_AG_K = TPBRT_SPECTRUM_BUILTIN_METAL_AG_K , tpbrt::spectrum_builtin::METAL_AL_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_AL_ETA , tpbrt::spectrum_builtin::METAL_AL_K = TPBRT_SPECTRUM_BUILTIN_METAL_AL_K , tpbrt::spectrum_builtin::METAL_AU_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_AU_ETA ,
  tpbrt::spectrum_builtin::METAL_AU_K = TPBRT_SPECTRUM_BUILTIN_METAL_AU_K , tpbrt::spectrum_builtin::METAL_CU_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_CU_ETA , tpbrt::spectrum_builtin::METAL_CU_K = TPBRT_SPECTRUM_BUILTIN_METAL_CU_K , tpbrt::spectrum_builtin::METAL_CU_ZN_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_CU_ZN_ETA ,
  tpbrt::spectrum_builtin::METAL_CU_ZN_K = TPBRT_SPECTRUM_BUILTIN_METAL_CU_ZN_K , tpbrt::spectrum_builtin::METAL_MG_O_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_MG_O_ETA , tpbrt::spectrum_builtin::METAL_MG_O_K = TPBRT_SPECTRUM_BUILTIN_METAL_MG_O_K , tpbrt::spectrum_builtin::METAL_TI_O2_ETA = TPBRT_SPECTRUM_BUILTIN_METAL_TI_O2_ETA ,
  tpbrt::spectrum_builtin::METAL_TI_O2_K = TPBRT_SPECTRUM_BUILTIN_METAL_TI_O2_K , tpbrt::spectrum_builtin::STD_ILLUM_A = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_A , tpbrt::spectrum_builtin::STD_ILLUM_D50 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_D50 , tpbrt::spectrum_builtin::STD_ILLUM_D65 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_D65 ,
  tpbrt::spectrum_builtin::STD_ILLUM_F1 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F1 , tpbrt::spectrum_builtin::STD_ILLUM_F2 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F2 , tpbrt::spectrum_builtin::STD_ILLUM_F3 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F3 , tpbrt::spectrum_builtin::STD_ILLUM_F4 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F4 ,
  tpbrt::spectrum_builtin::STD_ILLUM_F5 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F5 , tpbrt::spectrum_builtin::STD_ILLUM_F6 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F6 , tpbrt::spectrum_builtin::STD_ILLUM_F7 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F7 , tpbrt::spectrum_builtin::STD_ILLUM_F8 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F8 ,
  tpbrt::spectrum_builtin::STD_ILLUM_F9 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F9 , tpbrt::spectrum_builtin::STD_ILLUM_F10 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F10 , tpbrt::spectrum_builtin::STD_ILLUM_F11 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F11 , tpbrt::spectrum_builtin::STD_ILLUM_F12 = TPBRT_SPECTRUM_BUILTIN_STD_ILLUM_F12 ,
  tpbrt::spectrum_builtin::ILLUM_ACES_D60 = TPBRT_SPECTRUM_BUILTIN_ILLUM_ACES_D60 , tpbrt::spectrum_builtin::MAX_NUM = TPBRT_SPECTRUM_BUILTIN_MAX_NUM
}
 Spectrum builtins. More...
 

Functions

constexpr std::string_view tpbrt::to_string (const color_space space) noexcept
 Converts color_space enum value to string.
 
constexpr std::string_view tpbrt::to_string (const spectrum_type type) noexcept
 Converts spectrum_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const spectrum_builtin builtin) noexcept
 Converts spectrum_builtin enum value to string.
 

Detailed Description

Typedef Documentation

◆ rgb

using tpbrt::rgb = typedef vec3

C++ wrapper for tpbrt_rgb_t.

◆ wavelength_array

◆ rgb_array

C++ wrapper for tpbrt_rgb_array_t.

Enumeration Type Documentation

◆ color_space

enum class tpbrt::color_space : uchar_t
strong

Color space types.

Enumerator
ACES_2065_1 

The standard color space defined in the Academy Color Encoding System.

REC_2020 

The ITU-R Recommendation BT.2020 color space.

DCI_P3 

The DCI-P3 color space, widely used in current displays.

SRGB 

The venerable sRGB color space; it has the smallest gamut of pbrt-v4's color spaces, but is still widely used.

MAX_NUM 

Count of available color spaces.

◆ spectrum_type

enum class tpbrt::spectrum_type : uchar_t
strong

Spectrum value type.

Enumerator
WAVELENGTHS 

Spectrum defined as list of pairs (wavelength, value).

RGB 

Spectrum defined as RGB value.

BLACKBODY 

Spectrum defined as Blackbody temperature in Kelvins.

FILE 

Spectrum defined as file which contains wavelengths.

BUILTIN 

Spectrum defined as builtin value.

CONSTANT 

Spectrum defined as single constant float value.

MAX_NUM 

Count of available spectrum value types.

◆ spectrum_builtin

enum class tpbrt::spectrum_builtin : uchar_t
strong

Spectrum builtins.

Enumerator
GLASS_BK7 

Index of refraction for BK7 glass.

GLASS_BAF10 

Index of refraction for BAF10 glass.

GLASS_FK51A 

Index of refraction for FK51A glass.

GLASS_LASF9 

Index of refraction for LASF9 glass.

GLASS_F5 

Index of refraction for F5 glass.

GLASS_F10 

Index of refraction for F10 glass.

GLASS_F11 

Index of refraction for F11 glass.

METAL_AG_ETA 

Index of refraction for silver.

METAL_AG_K 

Extinction coefficient for silver.

METAL_AL_ETA 

Index of refraction for aluminum.

METAL_AL_K 

Extinction coefficient for aluminum.

METAL_AU_ETA 

Index of refraction for gold.

METAL_AU_K 

Extinction coefficient for gold.

METAL_CU_ETA 

Index of refraction for copper.

METAL_CU_K 

Extinction coefficient for copper.

METAL_CU_ZN_ETA 

Index of refraction for copper zinc alloy.

METAL_CU_ZN_K 

Extinction coefficient for copper zinc alloy.

METAL_MG_O_ETA 

Index of refraction for magnesium oxide.

METAL_MG_O_K 

Extinction coefficient for magnesium oxide.

METAL_TI_O2_ETA 

Index of refraction for titanium dioxide.

METAL_TI_O2_K 

Extinction coefficient for titanium dioxide.

STD_ILLUM_A 

CIE standard illuminant A.

STD_ILLUM_D50 

CIE standard illuminant D50.

STD_ILLUM_D65 

CIE standard illuminant D65.

STD_ILLUM_F1 

CIE standard illuminant F1.

STD_ILLUM_F2 

CIE standard illuminant F2.

STD_ILLUM_F3 

CIE standard illuminant F3.

STD_ILLUM_F4 

CIE standard illuminant F4.

STD_ILLUM_F5 

CIE standard illuminant F5.

STD_ILLUM_F6 

CIE standard illuminant F6.

STD_ILLUM_F7 

CIE standard illuminant F7.

STD_ILLUM_F8 

CIE standard illuminant F8.

STD_ILLUM_F9 

CIE standard illuminant F9.

STD_ILLUM_F10 

CIE standard illuminant F10.

STD_ILLUM_F11 

CIE standard illuminant F11.

STD_ILLUM_F12 

CIE standard illuminant F12.

ILLUM_ACES_D60 

D60 illuminant from ACES.

MAX_NUM 

Count of available spectrum builtins.

Function Documentation

◆ to_string() [1/3]

constexpr std::string_view tpbrt::to_string ( const color_space  space)
constexprnoexcept

Converts color_space enum value to string.

Parameters
spaceColor space.
Returns
String value of color space.

◆ to_string() [2/3]

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

Converts spectrum_type enum value to string.

Parameters
typeSpectrum type.
Returns
String value of spectrum type.

◆ to_string() [3/3]

constexpr std::string_view tpbrt::to_string ( const spectrum_builtin  builtin)
constexprnoexcept

Converts spectrum_builtin enum value to string.

Parameters
builtinSpectrum builtin.
Returns
String value of spectrum builtin.