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

Data Structures

struct  tpbrt::material_handle
 C++ wrapper for tpbrt_material_handle_t. More...
 
struct  tpbrt::material_bump_map_params
 C++ wrapper for tpbrt_material_bump_map_params_t. More...
 
struct  tpbrt::material_roughness_params
 C++ wrapper for tpbrt_material_roughness_params_t. More...
 
struct  tpbrt::material_coated_diffuse_params
 C++ wrapper for tpbrt_material_coated_diffuse_params_t. More...
 
struct  tpbrt::material_coated_conductor_eta_k
 Conductor eta and k values of the coated conductor material. More...
 
struct  tpbrt::material_coated_conductor_params
 C++ wrapper for tpbrt_material_coated_conductor_params_t. More...
 
struct  tpbrt::material_conductor_eta_k
 Conductor eta and k values of the conductor material. More...
 
struct  tpbrt::material_conductor_params
 C++ wrapper for tpbrt_material_conductor_params_t. More...
 
struct  tpbrt::material_dielectric_params
 C++ wrapper for tpbrt_material_dielectric_params_t. More...
 
struct  tpbrt::material_diffuse_params
 C++ wrapper for tpbrt_material_diffuse_params_t. More...
 
struct  tpbrt::material_diffuse_transmission_params
 C++ wrapper for tpbrt_material_diffuse_transmission_params_t. More...
 
struct  tpbrt::material_hair_params
 C++ wrapper for tpbrt_material_hair_params_t. More...
 
struct  tpbrt::material_measured_params
 C++ wrapper for tpbrt_material_measured_params_t. More...
 
struct  tpbrt::material_mix_params
 C++ wrapper for tpbrt_material_mix_params_t. More...
 
struct  tpbrt::material_subsurface_sigma
 Absorption and scattering coefficients of the subsurface material. More...
 
struct  tpbrt::material_subsurface_scattering
 C++ wrapper for tpbrt_material_subsurface_scattering_t. More...
 
struct  tpbrt::material_subsurface_params
 C++ wrapper for tpbrt_material_subsurface_params_t. More...
 
struct  tpbrt::material_thin_dielectric_params
 C++ wrapper for tpbrt_material_thin_dielectric_params_t. More...
 
struct  tpbrt::material
 C++ wrapper for tpbrt_material_t. More...
 
struct  tpbrt::materials_list
 C++ wrapper for tpbrt_materials_list_t. More...
 

Typedefs

using tpbrt::material_idx_t = tpbrt_material_idx_t
 Material index type.
 

Enumerations

enum class  tpbrt::material_type : uchar_t {
  tpbrt::material_type::COATED_DIFFUSE = TPBRT_MATERIAL_TYPE_COATED_DIFFUSE , tpbrt::material_type::COATED_CONDUCTOR = TPBRT_MATERIAL_TYPE_COATED_CONDUCTOR , tpbrt::material_type::CONDUCTOR = TPBRT_MATERIAL_TYPE_CONDUCTOR , tpbrt::material_type::DIELECTRIC = TPBRT_MATERIAL_TYPE_DIELECTRIC ,
  tpbrt::material_type::DIFFUSE = TPBRT_MATERIAL_TYPE_DIFFUSE , tpbrt::material_type::DIFFUSE_TRANSMISSION = TPBRT_MATERIAL_TYPE_DIFFUSE_TRANSMISSION , tpbrt::material_type::HAIR = TPBRT_MATERIAL_TYPE_HAIR , tpbrt::material_type::INTERFACE = TPBRT_MATERIAL_TYPE_INTERFACE ,
  tpbrt::material_type::MEASURED = TPBRT_MATERIAL_TYPE_MEASURED , tpbrt::material_type::MIX = TPBRT_MATERIAL_TYPE_MIX , tpbrt::material_type::SUBSURFACE = TPBRT_MATERIAL_TYPE_SUBSURFACE , tpbrt::material_type::THIN_DIELECTRIC = TPBRT_MATERIAL_TYPE_THIN_DIELECTRIC ,
  tpbrt::material_type::MAX_NUM = TPBRT_MATERIAL_TYPE_MAX_NUM
}
 Material types. More...
 
enum class  tpbrt::material_bump_map_type : uchar_t { tpbrt::material_bump_map_type::NONE = TPBRT_MATERIAL_BUMP_MAP_TYPE_NONE , tpbrt::material_bump_map_type::DISPLACEMENT = TPBRT_MATERIAL_BUMP_MAP_TYPE_DISPLACEMENT , tpbrt::material_bump_map_type::NORMAL_MAP = TPBRT_MATERIAL_BUMP_MAP_TYPE_NORMAL_MAP , tpbrt::material_bump_map_type::MAX_NUM = TPBRT_MATERIAL_BUMP_MAP_TYPE_MAX_NUM }
 Material bump map types. More...
 
enum class  tpbrt::material_conductor_value_type : uchar_t { tpbrt::material_conductor_value_type::ETA_K = TPBRT_MATERIAL_CONDUCTOR_VALUE_TYPE_ETA_K , tpbrt::material_conductor_value_type::REFLECTANCE = TPBRT_MATERIAL_CONDUCTOR_VALUE_TYPE_REFLECTANCE , tpbrt::material_conductor_value_type::MAX_NUM = TPBRT_MATERIAL_CONDUCTOR_VALUE_TYPE_MAX_NUM }
 Conductor material value type. More...
 
enum class  tpbrt::material_subsurface_scattering_value : uchar_t { tpbrt::material_subsurface_scattering_value::SIGMA = TPBRT_MATERIAL_SUBSURFACE_SCATTERING_VALUE_SIGMA , tpbrt::material_subsurface_scattering_value::BUILTIN = TPBRT_MATERIAL_SUBSURFACE_SCATTERING_VALUE_BUILTIN , tpbrt::material_subsurface_scattering_value::MAX_NUM = TPBRT_MATERIAL_SUBSURFACE_SCATTERING_VALUE_MAX_NUM }
 Subsurface material scattering value type. More...
 

Functions

constexpr std::string_view tpbrt::to_string (const material_type type) noexcept
 Converts material_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const material_bump_map_type type) noexcept
 Converts material_bump_map_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const material_conductor_value_type type) noexcept
 Converts material_conductor_value_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const material_subsurface_scattering_value scattering_value) noexcept
 Converts material_subsurface_scattering_value enum value to string.
 
result< material > tpbrt::get_material (const materials_list list, const material_handle handle) noexcept
 Returns material to which handle is provided.
 
result< material > tpbrt::get_material (const materials_list list, const std::string_view name) noexcept
 Returns material with given name.
 

Variables

constexpr auto tpbrt::MaterialInvalidIdx = TPBRT_MATERIAL_IDX_INVALID
 Invalid material index.
 

Detailed Description

Typedef Documentation

◆ material_idx_t

Material index type.

Enumeration Type Documentation

◆ material_type

enum class tpbrt::material_type : uchar_t
strong

Material types.

Enumerator
COATED_DIFFUSE 

Coated diffuse.

COATED_CONDUCTOR 

Coated conductor.

CONDUCTOR 

Conductor.

DIELECTRIC 

Dielectric.

DIFFUSE 

Diffuse.

DIFFUSE_TRANSMISSION 

Diffuse transmission.

HAIR 

Hair.

INTERFACE 

Interface.

MEASURED 

Measured.

MIX 

Mix.

SUBSURFACE 

Subsurface.

THIN_DIELECTRIC 

Thin Dielectric.

MAX_NUM 

Count of available material types.

◆ material_bump_map_type

Material bump map types.

Enumerator
NONE 

No bump map.

DISPLACEMENT 

Displacement as bump map.

NORMAL_MAP 

Normal map as bump map.

MAX_NUM 

Count of available material bump map types.

◆ material_conductor_value_type

Conductor material value type.

Enumerator
ETA_K 

Conductor material value defined as 'eta' and 'k' values.

REFLECTANCE 

Conductor material value defined as 'reflectance' value.

MAX_NUM 

Count of available conductor material value types.

◆ material_subsurface_scattering_value

Subsurface material scattering value type.

Enumerator
SIGMA 

Uses sigma_s and sigma_a values.

BUILTIN 

Uses builtin as sigma_s and sigma_a values.

MAX_NUM 

Count of available material scattering values.

Function Documentation

◆ to_string() [1/4]

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

Converts material_type enum value to string.

Parameters
typeMaterial type.
Returns
String value of material type.

◆ to_string() [2/4]

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

Converts material_bump_map_type enum value to string.

Parameters
typeMaterial bump map type.
Returns
String value of material bump map type.

◆ to_string() [3/4]

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

Converts material_conductor_value_type enum value to string.

Parameters
typeMaterial conductor value type.
Returns
String value of material conductor value type.

◆ to_string() [4/4]

constexpr std::string_view tpbrt::to_string ( const material_subsurface_scattering_value  scattering_value)
constexprnoexcept

Converts material_subsurface_scattering_value enum value to string.

Parameters
scattering_valueMaterial scattering value.
Returns
String value of material scattering value.

◆ get_material() [1/2]

result< material > tpbrt::get_material ( const materials_list  list,
const material_handle  handle 
)
inlinenoexcept

Returns material to which handle is provided.

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

◆ get_material() [2/2]

result< material > tpbrt::get_material ( const materials_list  list,
const std::string_view  name 
)
inlinenoexcept

Returns material with given name.

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

Variable Documentation

◆ MaterialInvalidIdx

constexpr auto tpbrt::MaterialInvalidIdx = TPBRT_MATERIAL_IDX_INVALID
inlineconstexpr

Invalid material index.