2#ifndef _TINYPBRT_LIGHT_H_
3#define _TINYPBRT_LIGHT_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
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.
tpbrt_light_source_type_t
Light source type.
Definition light.h:26
tpbrt_area_light_type_t
Area light type.
Definition light.h:161
tpbrt_idx_t tpbrt_area_light_idx_t
Area light index type.
Definition fwd.h:351
@ TPBRT_LIGHT_SOURCE_TYPE_INFINITE
Infinite light source.
Definition light.h:32
@ TPBRT_LIGHT_SOURCE_TYPE_DISTANT
Distant (directional) light source.
Definition light.h:28
@ TPBRT_LIGHT_SOURCE_TYPE_POINT
Point light source.
Definition light.h:34
@ TPBRT_LIGHT_SOURCE_TYPE_GONIOMETRIC
Goniometric light source.
Definition light.h:30
@ TPBRT_LIGHT_SOURCE_TYPE_SPOT
Spot light source.
Definition light.h:38
@ TPBRT_LIGHT_SOURCE_TYPE_PROJECTION
Projection light source.
Definition light.h:36
@ TPBRT_LIGHT_SOURCE_TYPE_MAX_NUM
Count of available light source types.
Definition light.h:40
@ TPBRT_AREA_LIGHT_TYPE_MAX_NUM
Count of available area light types.
Definition light.h:165
@ TPBRT_AREA_LIGHT_TYPE_DIFFUSE
Diffuse area light.
Definition light.h:163
float tpbrt_float_t
Float type.
Definition fwd.h:83
size_t tpbrt_size_t
Size type.
Definition fwd.h:93
uint8_t tpbrt_bool_t
Bool type.
Definition fwd.h:68
Diffuse area light parameters.
Definition light.h:172
tpbrt_spectrum_t l
Spectral distribution of the light's emitted radiance.
Definition light.h:176
tpbrt_bool_t two_sided
Determines whether the light source emits light from just the side of the surface where the surface n...
Definition light.h:178
tpbrt_string_t file_name
Filename for an image that describes spatially-varying emission over the surface of the emitter....
Definition light.h:174
Area light handle.
Definition light.h:207
tpbrt_area_light_idx_t area_light_idx
Area light index.
Definition light.h:209
PBRT area light representation.
Definition light.h:185
union tpbrt_area_light_t::@8 as
Value dependent on type value.
tpbrt_area_light_diffuse_params_t diffuse
Diffuse area light parameters.
Definition light.h:196
tpbrt_area_light_type_t type
Area light value type.
Definition light.h:200
tpbrt_area_light_idx_t idx
Area light index.
Definition light.h:187
tpbrt_float_t scale
Scale factor that modulates the amount of light that the light source emits into the scene.
Definition light.h:189
tpbrt_opt_float_t power
Total luminous power or illuminance emitted by the light.
Definition light.h:191
List of area lights.
Definition light.h:227
tpbrt_size_t count
Number of area lights in list.
Definition light.h:231
tpbrt_area_light_t * lights
Area lights.
Definition light.h:229
Distant light source parameters.
Definition light.h:47
tpbrt_point_t from
"from" and "to" define the direction vector along which illumination from the light arrives at the sc...
Definition light.h:51
tpbrt_point_t to
"from" and "to" define the direction vector along which illumination from the light arrives at the sc...
Definition light.h:53
tpbrt_spectrum_t l
Spectral distribution of the radiance emitted by the light source.
Definition light.h:49
Goniometric light source parameters.
Definition light.h:60
tpbrt_string_t file_name
The filename of the image file that stores a goniometric diagram to use for the lighting distribution...
Definition light.h:62
tpbrt_spectrum_t i
The spectral distribution of emission from the light; the radiant intensity in a particular direction...
Definition light.h:64
Infinite light source parameters.
Definition light.h:71
tpbrt_string_t file_name
The environment map to use for the infinite area light. If no filename is provided,...
Definition light.h:73
tpbrt_spectrum_t l
The spectral distribution of emission from the light; the radiance intensity in a particular directio...
Definition light.h:77
tpbrt_point3_t portal[4]
If provided, these points should specify a planar quadrilateral through with the light source is visi...
Definition light.h:75
Point light source parameters.
Definition light.h:84
tpbrt_spectrum_t i
Spectral distribution of the light's emitted radiant intensity.
Definition light.h:86
tpbrt_point_t from
The location of the light.
Definition light.h:88
Projection light source parameters.
Definition light.h:95
tpbrt_string_t file_name
The image to project into the scene.
Definition light.h:99
tpbrt_float_t fov
The spread angle of the projected light, along the shorter image axis.
Definition light.h:101
tpbrt_spectrum_t i
Spectral distribution of the light's emitted radiant intensity.
Definition light.h:97
Spot light source parameters.
Definition light.h:108
tpbrt_point_t from
One of two points defining the lighting vector.
Definition light.h:112
tpbrt_point_t to
One of two points defining the lighting vector.
Definition light.h:114
tpbrt_float_t cone_delta_angle
The angle at which the spotlight intensity begins to fall off at the edges.
Definition light.h:118
tpbrt_float_t cone_angle
The angle that the spotlight's cone makes with its primary axis. For directions up to this angle from...
Definition light.h:116
tpbrt_spectrum_t i
Spectral distribution of the light's emitted radiant intensity.
Definition light.h:110
PBRT light source representation.
Definition light.h:125
union tpbrt_light_source_t::@7 as
Value dependent on type value.
tpbrt_light_source_projection_params_t projection
Projection light source parameters.
Definition light.h:148
tpbrt_light_source_infinite_params_t infinite
Infinite light source parameters.
Definition light.h:144
tpbrt_light_source_spot_params_t spot
Spot light source parameters.
Definition light.h:150
tpbrt_light_source_goniometric_params_t goniometric
Goniometric light source parameters.
Definition light.h:142
tpbrt_transform_handle_t transform
Transform handle.
Definition light.h:127
tpbrt_float_t scale
Scale factor that modulates the amount of light that the light source emits into the scene.
Definition light.h:129
tpbrt_light_source_point_params_t point
Point light source parameters.
Definition light.h:146
tpbrt_media_handle_t exterior_media_handle
Exterior media handle.
Definition light.h:135
tpbrt_light_source_distant_params_t distant
Distant light source parameters.
Definition light.h:140
tpbrt_light_source_type_t type
Light value type.
Definition light.h:154
tpbrt_media_handle_t interior_media_handle
Interior media handle.
Definition light.h:133
tpbrt_opt_float_t power_illuminance
Total luminous power or illuminance emitted by the light.
Definition light.h:131
List of all types of lights.
Definition light.h:238
tpbrt_area_lights_list_t area_lights
List of area lights.
Definition light.h:242
tpbrt_lights_sources_list_t lights_sources
List of light sources.
Definition light.h:240
List of light sources.
Definition light.h:216
tpbrt_size_t count
Number of light sources in list.
Definition light.h:220
tpbrt_light_source_t * lights
Light sources.
Definition light.h:218
Optional float value.
Definition math.h:20
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
3 component vector.
Definition math.h:98