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_t
 Distant light source parameters. More...
 
struct  tpbrt_light_source_goniometric_params_t
 Goniometric light source parameters. More...
 
struct  tpbrt_light_source_infinite_params_t
 Infinite light source parameters. More...
 
struct  tpbrt_light_source_point_params_t
 Point light source parameters. More...
 
struct  tpbrt_light_source_projection_params_t
 Projection light source parameters. More...
 
struct  tpbrt_light_source_spot_params_t
 Spot light source parameters. More...
 
struct  tpbrt_light_source_t
 PBRT light source representation. More...
 
struct  tpbrt_area_light_diffuse_params_t
 Diffuse area light parameters. More...
 
struct  tpbrt_area_light_t
 PBRT area light representation. More...
 
struct  tpbrt_area_light_handle_t
 Area light handle. More...
 
struct  tpbrt_lights_sources_list_t
 List of light sources. More...
 
struct  tpbrt_area_lights_list_t
 List of area lights. More...
 
struct  tpbrt_lights_list_t
 List of all types of lights. More...
 

Macros

#define TPBRT_AREA_LIGHT_IDX_INVALID   TPBRT_IDX_INVALID
 Invalid area light index.
 

Typedefs

typedef tpbrt_idx_t tpbrt_area_light_idx_t
 Area light index type.
 

Enumerations

enum  tpbrt_light_source_type_t {
  TPBRT_LIGHT_SOURCE_TYPE_DISTANT = 0 , TPBRT_LIGHT_SOURCE_TYPE_GONIOMETRIC = 1 , TPBRT_LIGHT_SOURCE_TYPE_INFINITE = 2 , TPBRT_LIGHT_SOURCE_TYPE_POINT = 3 ,
  TPBRT_LIGHT_SOURCE_TYPE_PROJECTION = 4 , TPBRT_LIGHT_SOURCE_TYPE_SPOT = 5 , TPBRT_LIGHT_SOURCE_TYPE_MAX_NUM = 6
}
 Light source type. More...
 
enum  tpbrt_area_light_type_t { TPBRT_AREA_LIGHT_TYPE_DIFFUSE = 0 , TPBRT_AREA_LIGHT_TYPE_MAX_NUM = 1 }
 Area light type. More...
 

Functions

tpbrt_error_t tpbrt_get_area_light_by_handle (const tpbrt_area_lights_list_t *area_lights_list, tpbrt_area_light_handle_t handle, const tpbrt_area_light_t **area_light)
 Returns pointer to area light to which handle is provided.
 

Detailed Description

Macro Definition Documentation

◆ TPBRT_AREA_LIGHT_IDX_INVALID

#define TPBRT_AREA_LIGHT_IDX_INVALID   TPBRT_IDX_INVALID

Invalid area light index.

Typedef Documentation

◆ tpbrt_area_light_idx_t

Area light index type.

Enumeration Type Documentation

◆ tpbrt_light_source_type_t

Light source type.

Enumerator
TPBRT_LIGHT_SOURCE_TYPE_DISTANT 

Distant (directional) light source.

TPBRT_LIGHT_SOURCE_TYPE_GONIOMETRIC 

Goniometric light source.

TPBRT_LIGHT_SOURCE_TYPE_INFINITE 

Infinite light source.

TPBRT_LIGHT_SOURCE_TYPE_POINT 

Point light source.

TPBRT_LIGHT_SOURCE_TYPE_PROJECTION 

Projection light source.

TPBRT_LIGHT_SOURCE_TYPE_SPOT 

Spot light source.

TPBRT_LIGHT_SOURCE_TYPE_MAX_NUM 

Count of available light source types.

◆ tpbrt_area_light_type_t

Area light type.

Enumerator
TPBRT_AREA_LIGHT_TYPE_DIFFUSE 

Diffuse area light.

TPBRT_AREA_LIGHT_TYPE_MAX_NUM 

Count of available area light types.

Function Documentation

◆ tpbrt_get_area_light_by_handle()

tpbrt_error_t tpbrt_get_area_light_by_handle ( const tpbrt_area_lights_list_t *  area_lights_list,
tpbrt_area_light_handle_t  handle,
const tpbrt_area_light_t **  area_light 
)

Returns pointer to area light to which handle is provided.

Parameters
area_lights_listList of area lights in which area light given by handle should be.
handleHandle to area light.
area_lightPointer in which pointer to area light will be stored (if not found this will be TPBRT_NULL).
Returns
Returns error code (most possible TPBRT_ERROR_NOT_FOUND, TPBRT_ERROR_NONE).
Examples
examples/lights/main.c, and examples/materials/main.c.