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::media_cloud_params
 C++ wrapper for tpbrt_media_cloud_params_t. More...
 
struct  tpbrt::media_sigma
 Absorption and scattering cross sections of the media. More...
 
struct  tpbrt::media_scattering
 C++ wrapper for tpbrt_media_scattering_t. More...
 
struct  tpbrt::media_homogeneous_params
 C++ wrapper for tpbrt_media_homogeneous_params_t. More...
 
struct  tpbrt::media_nano_vdb_params
 C++ wrapper for tpbrt_media_nano_vdb_params_t. More...
 
struct  tpbrt::media_rgb_grid_params
 C++ wrapper for tpbrt_media_rgb_grid_params_t. More...
 
struct  tpbrt::media_uniform_grid_params
 C++ wrapper for tpbrt_media_uniform_grid_params_t. More...
 
struct  tpbrt::media
 C++ wrapper for tpbrt_media_t. More...
 
struct  tpbrt::media_handle
 C++ wrapper for tpbrt_media_handle_t. More...
 
struct  tpbrt::medias_list
 C++ wrapper for tpbrt_medias_list_t. More...
 

Typedefs

using tpbrt::media_idx_t = tpbrt_media_idx_t
 Media index type.
 

Enumerations

enum class  tpbrt::media_type : uchar_t {
  tpbrt::media_type::CLOUD = TPBRT_MEDIA_TYPE_CLOUD , tpbrt::media_type::HOMOGENEOUS = TPBRT_MEDIA_TYPE_HOMOGENEOUS , tpbrt::media_type::NANO_VDB = TPBRT_MEDIA_TYPE_NANO_VDB , tpbrt::media_type::RGB_GRID = TPBRT_MEDIA_TYPE_RGB_GRID ,
  tpbrt::media_type::UNIFORM_GRID = TPBRT_MEDIA_TYPE_UNIFORM_GRID , tpbrt::media_type::MAX_NUM = TPBRT_MEDIA_TYPE_MAX_NUM
}
 Media type. More...
 
enum class  tpbrt::media_scattering_value : uchar_t { tpbrt::media_scattering_value::SIGMA = TPBRT_MEDIA_SCATTERING_VALUE_SIGMA , tpbrt::media_scattering_value::PRESET = TPBRT_MEDIA_SCATTERING_VALUE_PRESET , tpbrt::media_scattering_value::MAX_NUM = TPBRT_MEDIA_SCATTERING_VALUE_MAX_NUM }
 Media scattering value type. More...
 

Functions

constexpr std::string_view tpbrt::to_string (const media_type type) noexcept
 Converts media_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const media_scattering_value scattering_value) noexcept
 Converts media_scattering_value enum value to string.
 
result< media > tpbrt::get_media (const medias_list list, const media_handle handle) noexcept
 Returns media to which handle is provided.
 
result< media > tpbrt::get_media (const medias_list list, const std::string_view name) noexcept
 Returns media with given name.
 

Variables

constexpr auto tpbrt::MediaInvalidIdx = TPBRT_MEDIA_IDX_INVALID
 Invalid media index.
 

Detailed Description

Typedef Documentation

◆ media_idx_t

Media index type.

Enumeration Type Documentation

◆ media_type

enum class tpbrt::media_type : uchar_t
strong

Media type.

Enumerator
CLOUD 

Cloud.

HOMOGENEOUS 

Homogeneous.

NANO_VDB 

Nano vdb.

RGB_GRID 

Rgb grid.

UNIFORM_GRID 

Uniform grid.

MAX_NUM 

Count of available media types.

◆ media_scattering_value

Media scattering value type.

Enumerator
SIGMA 

Uses sigma_s and sigma_a values.

PRESET 

Uses preset as sigma_s and sigma_a values.

MAX_NUM 

Count of available media scattering values.

Function Documentation

◆ to_string() [1/2]

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

Converts media_type enum value to string.

Parameters
typeMedia type.
Returns
String value of media type.

◆ to_string() [2/2]

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

Converts media_scattering_value enum value to string.

Parameters
scattering_valueMedia scattering value.
Returns
String value of media scattering value.

◆ get_media() [1/2]

result< media > tpbrt::get_media ( const medias_list  list,
const media_handle  handle 
)
inlinenoexcept

Returns media to which handle is provided.

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

◆ get_media() [2/2]

result< media > tpbrt::get_media ( const medias_list  list,
const std::string_view  name 
)
inlinenoexcept

Returns media with given name.

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

Variable Documentation

◆ MediaInvalidIdx

constexpr auto tpbrt::MediaInvalidIdx = TPBRT_MEDIA_IDX_INVALID
inlineconstexpr

Invalid media index.