tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
media.h
Go to the documentation of this file.
1#pragma once
2#ifndef _TINYPBRT_MEDIA_H_
3#define _TINYPBRT_MEDIA_H_
4
6
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
41
64
77
99
116
139
168
203
233
242
255
265 const tpbrt_media_t** media);
275 const tpbrt_media_t** media);
276
277#ifdef __cplusplus
278}
279#endif
280#endif // _TINYPBRT_MEDIA_H_
#define TPBRT_API
Definition export.h:18
tpbrt_error_t
Error type (used as result type where success = TPBRT_ERROR_NONE = 0).
Definition error.h:20
float tpbrt_float_t
Float type.
Definition fwd.h:83
size_t tpbrt_size_t
Size type.
Definition fwd.h:93
uint32_t tpbrt_uint_t
Unsigned int type.
Definition fwd.h:78
tpbrt_idx_t tpbrt_media_idx_t
Media index type.
Definition fwd.h:309
tpbrt_media_scattering_value_t
Media scattering value type.
Definition media.h:69
tpbrt_media_type_t
Media type.
Definition media.h:27
tpbrt_error_t tpbrt_get_media_by_handle(const tpbrt_medias_list_t *medias, tpbrt_media_handle_t handle, const tpbrt_media_t **media)
Returns pointer to media to which handle is provided.
tpbrt_error_t tpbrt_get_media_by_name(const tpbrt_medias_list_t *medias, tpbrt_string_t name, const tpbrt_media_t **media)
Returns pointer to media with given name.
@ TPBRT_MEDIA_SCATTERING_VALUE_PRESET
Uses preset as sigma_s and sigma_a values.
Definition media.h:73
@ TPBRT_MEDIA_SCATTERING_VALUE_SIGMA
Uses sigma_s and sigma_a values.
Definition media.h:71
@ TPBRT_MEDIA_SCATTERING_VALUE_MAX_NUM
Count of available media scattering values.
Definition media.h:75
@ TPBRT_MEDIA_TYPE_HOMOGENEOUS
Homogeneous.
Definition media.h:31
@ TPBRT_MEDIA_TYPE_RGB_GRID
Rgb grid.
Definition media.h:35
@ TPBRT_MEDIA_TYPE_UNIFORM_GRID
Uniform grid.
Definition media.h:37
@ TPBRT_MEDIA_TYPE_CLOUD
Cloud.
Definition media.h:29
@ TPBRT_MEDIA_TYPE_MAX_NUM
Count of available media types.
Definition media.h:39
@ TPBRT_MEDIA_TYPE_NANO_VDB
Nano vdb.
Definition media.h:33
tpbrt_scattering_builtin_t
Scattering builtins.
Definition scattering.h:20
Array of float values.
Definition math.h:64
Cloud media parameters.
Definition media.h:46
tpbrt_spectrum_t sigma_s
The cloud's scattering cross section.
Definition media.h:62
tpbrt_float_t density
Additional scale factor applied to the computed cloud density.
Definition media.h:48
tpbrt_float_t wispiness
Parameter that controls how wispy the cloud density is.
Definition media.h:58
tpbrt_point3_t p1
Extent of the cloud in the medium's space.
Definition media.h:56
tpbrt_point3_t p0
Extent of the cloud in the medium's space.
Definition media.h:52
tpbrt_spectrum_t sigma_a
The cloud's absorption cross section.
Definition media.h:60
tpbrt_float_t g
The medium's Henyey-Greenstein phase function asymmetry parameter.
Definition media.h:54
tpbrt_float_t frequency
Parameter that controls the frequency at which the cloud's density varies.
Definition media.h:50
Media handle.
Definition media.h:238
tpbrt_media_idx_t media_idx
Media index.
Definition media.h:240
Homogeneous media parameters.
Definition media.h:104
tpbrt_media_scattering_t scattering
Homogeneous scattering value.
Definition media.h:112
tpbrt_float_t scale
Scale factor applied to the absorption and scattering cross sections.
Definition media.h:114
tpbrt_float_t g
The medium's Henyey-Greenstein phase function asymmetry parameter.
Definition media.h:106
tpbrt_float_t le_scale
Scale factor applied to the medium's emitted radiance.
Definition media.h:108
tpbrt_spectrum_t le
Spectral distribution of the medium's emitted radiance, if any.
Definition media.h:110
Nano vdb media parameters.
Definition media.h:121
tpbrt_float_t temperature_offset
Offset value that is added to the emission temperature, if present.
Definition media.h:133
tpbrt_float_t scale
Additional scale factor applied to the absorption and scattering cross sections.
Definition media.h:137
tpbrt_spectrum_t sigma_s
The scattering cross section; this value is scaled by the NanoVDB volume's density at each point.
Definition media.h:129
tpbrt_float_t g
The medium's Henyey-Greenstein phase function asymmetry parameter.
Definition media.h:123
tpbrt_float_t temperature_scale
Scale factor applied to the offset emission temperature to get a temperature in kelvin before the bla...
Definition media.h:135
tpbrt_string_t file_name
Filename of the NanoVDB volume.
Definition media.h:131
tpbrt_spectrum_t sigma_a
The absorption cross section; this value is scaled by the NanoVDB volume's density at each point.
Definition media.h:127
tpbrt_float_t le_scale
Scale factor applied to the medium's emitted radiance.
Definition media.h:125
Rgb grid media parameters.
Definition media.h:144
tpbrt_rgb_array_t sigma_s
nx*ny*nz RGB colors that specify the grid of scattering cross sections.
Definition media.h:158
tpbrt_point3_t p1
Extent of the density grid in the medium's space: the coordinates of the lookup point are found with ...
Definition media.h:152
tpbrt_float_t g
The medium's Henyey-Greenstein phase function asymmetry parameter.
Definition media.h:154
tpbrt_point3_t p0
Extent of the density grid in the medium's space: the coordinates of the lookup point are found with ...
Definition media.h:148
tpbrt_uint_t nx
Grid size in x-coordinates.
Definition media.h:162
tpbrt_float_t le_scale
Scale factor applied to the medium's emitted radiance.
Definition media.h:150
tpbrt_rgb_array_t sigma_a
nx*ny*nz RGB colors that specify the grid of absorption cross sections.
Definition media.h:156
tpbrt_rgb_array_t le
nx*ny*nz RGB colors that specify a grid of emission spectra.
Definition media.h:146
tpbrt_float_t scale
Scale factor applied to the absorption and scattering cross sections.
Definition media.h:160
tpbrt_uint_t ny
Grid size in y-coordinates.
Definition media.h:164
tpbrt_uint_t nz
Grid size in z-coordinates.
Definition media.h:166
Media scattering.
Definition media.h:82
tpbrt_spectrum_t s
The scattering cross section.
Definition media.h:89
tpbrt_spectrum_t a
The absorption cross section.
Definition media.h:87
struct tpbrt_media_scattering_t::@19::@20 sigma
union tpbrt_media_scattering_t::@19 as
Scattering value dependent on type value.
tpbrt_media_scattering_value_t type
Scattering value type.
Definition media.h:97
tpbrt_scattering_builtin_t preset
Named measured scattering medium properties to use.
Definition media.h:93
PBRT media representation.
Definition media.h:208
tpbrt_media_cloud_params_t cloud
Cloud media parameters.
Definition media.h:219
tpbrt_string_t name
Media name.
Definition media.h:214
tpbrt_media_homogeneous_params_t homogeneous
Homogeneous media parameters.
Definition media.h:221
tpbrt_transform_handle_t transform
Transform handle.
Definition media.h:212
tpbrt_media_type_t type
Media value type.
Definition media.h:231
tpbrt_media_nano_vdb_params_t nano_vdb
Nano vdb media parameters.
Definition media.h:227
tpbrt_media_idx_t idx
Media index.
Definition media.h:210
tpbrt_media_uniform_grid_params_t uniform_grid
Uniform grid media parameters.
Definition media.h:223
tpbrt_media_rgb_grid_params_t rgb_grid
Rgb grid media parameters.
Definition media.h:225
union tpbrt_media_t::@21 as
Value dependent on type value.
Uniform grid media parameters.
Definition media.h:173
tpbrt_float_t temperature_offset
Offset value that is added to the emission temperature, if present.
Definition media.h:199
tpbrt_float_array_t temperature
nx*ny*nz blackbody temperature values in kelvin, in row-major order. If specified,...
Definition media.h:197
tpbrt_uint_t nx
Grid size in x-coordinates.
Definition media.h:185
tpbrt_float_t le_scale
Scale factor applied to the medium's emitted radiance.
Definition media.h:181
tpbrt_point3_t p0
Extent of the density grid in the medium's space: the coordinates of the lookup point are found with ...
Definition media.h:179
tpbrt_float_array_t density
nx*ny*nz density values, in row-major order.
Definition media.h:175
tpbrt_uint_t nz
Grid size in z-coordinates.
Definition media.h:189
tpbrt_float_t g
The medium's Henyey-Greenstein phase function asymmetry parameter.
Definition media.h:195
tpbrt_spectrum_t le
Spectral distribution of the medium's emitted radiance.
Definition media.h:177
tpbrt_float_t temperature_scale
Scale factor applied to the offset emission temperature to get a temperature in kelvin before the bla...
Definition media.h:201
tpbrt_point3_t p1
Extent of the density grid in the medium's space: the coordinates of the lookup point are found with ...
Definition media.h:183
tpbrt_float_t scale
Scale factor applied to the absorption and scattering cross sections.
Definition media.h:193
tpbrt_media_scattering_t scattering
Scattering value.
Definition media.h:191
tpbrt_uint_t ny
Grid size in y-coordinates.
Definition media.h:187
Medias list.
Definition media.h:247
tpbrt_name_index_t names
Names indexes.
Definition media.h:253
tpbrt_size_t count
Number of media items in list.
Definition media.h:251
tpbrt_media_t * medias
Medias list items.
Definition media.h:249
Keeps name indexes for faster lookups.
Definition common.h:42
PBRT Spectrum representation.
Definition color.h:166
Simple string representation (not always terminated with '\0', the size determines the length of the ...
Definition common.h:20
Transform handle.
Definition transform.h:23
Array of 3 component vectors.
Definition math.h:170
3 component vector.
Definition math.h:98