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::light_source_distant_params
 C++ wrapper for tpbrt_light_source_distant_params_t. More...
 
struct  tpbrt::light_source_goniometric_params
 C++ wrapper for tpbrt_light_source_goniometric_params_t. More...
 
struct  tpbrt::light_source_infinite_params
 C++ wrapper for tpbrt_light_source_infinite_params_t. More...
 
struct  tpbrt::light_source_point_params
 C++ wrapper for tpbrt_light_source_point_params_t. More...
 
struct  tpbrt::light_source_projection_params
 C++ wrapper for tpbrt_light_source_projection_params_t. More...
 
struct  tpbrt::light_source_spot_params
 C++ wrapper for tpbrt_light_source_spot_params_t. More...
 
struct  tpbrt::light_source
 C++ wrapper for tpbrt_light_source_t. More...
 
struct  tpbrt::area_light_diffuse_params
 C++ wrapper for tpbrt_area_light_diffuse_params_t. More...
 
struct  tpbrt::area_light
 C++ wrapper for tpbrt_area_light_t. More...
 
struct  tpbrt::area_light_handle
 C++ wrapper for tpbrt_area_light_handle_t. More...
 
struct  tpbrt::area_lights_list
 C++ wrapper for tpbrt_area_lights_list_t. More...
 
struct  tpbrt::lights_list
 C++ wrapper for tpbrt_lights_list_t. More...
 

Typedefs

using tpbrt::area_light_idx_t = tpbrt_area_light_idx_t
 Area light index type.
 
using tpbrt::lights_sources_list = array< tpbrt_lights_sources_list_t, light_source, &tpbrt_lights_sources_list_t::lights >
 C++ wrapper for tpbrt_lights_sources_list_t.
 

Enumerations

enum class  tpbrt::light_source_type : uchar_t {
  tpbrt::light_source_type::DISTANT = TPBRT_LIGHT_SOURCE_TYPE_DISTANT , tpbrt::light_source_type::GONIOMETRIC = TPBRT_LIGHT_SOURCE_TYPE_GONIOMETRIC , tpbrt::light_source_type::INFINITE = TPBRT_LIGHT_SOURCE_TYPE_INFINITE , tpbrt::light_source_type::POINT = TPBRT_LIGHT_SOURCE_TYPE_POINT ,
  tpbrt::light_source_type::PROJECTION = TPBRT_LIGHT_SOURCE_TYPE_PROJECTION , tpbrt::light_source_type::SPOT = TPBRT_LIGHT_SOURCE_TYPE_SPOT , tpbrt::light_source_type::MAX_NUM = TPBRT_LIGHT_SOURCE_TYPE_MAX_NUM
}
 Light source type. More...
 
enum class  tpbrt::area_light_type : uchar_t { tpbrt::area_light_type::DIFFUSE = TPBRT_AREA_LIGHT_TYPE_DIFFUSE , tpbrt::area_light_type::MAX_NUM = TPBRT_AREA_LIGHT_TYPE_MAX_NUM }
 Area light type. More...
 

Functions

constexpr std::string_view tpbrt::to_string (const light_source_type type) noexcept
 Converts light_source_type enum value to string.
 
constexpr std::string_view tpbrt::to_string (const area_light_type type) noexcept
 Converts area_light_type enum value to string.
 
result< area_light > tpbrt::get_area_light (const area_lights_list list, const area_light_handle handle) noexcept
 Returns area light to which handle is provided.
 

Variables

constexpr auto tpbrt::AreaLightInvalidIdx = TPBRT_AREA_LIGHT_IDX_INVALID
 Invalid area light index.
 

Detailed Description

Typedef Documentation

◆ area_light_idx_t

Area light index type.

◆ lights_sources_list

Enumeration Type Documentation

◆ light_source_type

enum class tpbrt::light_source_type : uchar_t
strong

Light source type.

Enumerator
DISTANT 

Distant (directional) light source.

GONIOMETRIC 

Goniometric light source.

INFINITE 

Infinite light source.

POINT 

Point light source.

PROJECTION 

Projection light source.

SPOT 

Spot light source.

MAX_NUM 

Count of available light source types.

◆ area_light_type

enum class tpbrt::area_light_type : uchar_t
strong

Area light type.

Enumerator
DIFFUSE 

Diffuse area light.

MAX_NUM 

Count of available area light types.

Function Documentation

◆ to_string() [1/2]

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

Converts light_source_type enum value to string.

Parameters
typeLight source type.
Returns
String value of light source type.

◆ to_string() [2/2]

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

Converts area_light_type enum value to string.

Parameters
typeArea light type.
Returns
String value of area light type.

◆ get_area_light()

result< area_light > tpbrt::get_area_light ( const area_lights_list  list,
const area_light_handle  handle 
)
inlinenoexcept

Returns area light to which handle is provided.

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

Variable Documentation

◆ AreaLightInvalidIdx

constexpr auto tpbrt::AreaLightInvalidIdx = TPBRT_AREA_LIGHT_IDX_INVALID
inlineconstexpr

Invalid area light index.