2#ifndef _TINYPBRT_FILM_HPP_
3#define _TINYPBRT_FILM_HPP_
42 case RGB:
return "rgb";
46 default:
return "UNKNOWN";
56 using wrapper::wrapper;
73 using wrapper::wrapper;
76 [[nodiscard]]
constexpr uint_t nbuckets() const noexcept {
return _native->nbuckets; }
161 default:
return "UNKNOWN";
169 struct film : detail::wrapper<film, tpbrt_film_t>,
170 detail::with_variant<film, film_gbuffer_params, film_spectral_params> {
178 using wrapper::wrapper;
187 [[nodiscard]]
constexpr string file_name() const noexcept {
return _native->file_name; }
196 [[nodiscard]]
constexpr float_t diagonal() const noexcept {
return _native->diagonal; }
199 [[nodiscard]]
constexpr float_t iso() const noexcept {
return _native->iso; }
223 [[nodiscard]]
constexpr std::optional<film_gbuffer_params>
as_gbuffer() const noexcept {
225 return _native->as.gbuffer;
229 [[nodiscard]]
constexpr std::optional<film_spectral_params>
as_spectral() const noexcept {
231 return _native->as.spectral;
235 [[nodiscard]]
constexpr variant_type
to_variant() const noexcept {
238 case GBUFFER:
return _native->as.gbuffer;
239 case SPECTRAL:
return _native->as.spectral;
247 [[nodiscard]]
constexpr auto reflect() const noexcept {
constexpr std::string_view to_string(const accelerator_type type) noexcept
Converts accelerator_type enum value to string.
Definition accelerator.hpp:39
@ MAX_NUM
Count of available accelerator types.
@ RGB
Spectrum defined as RGB value.
tpbrt_uchar_t uchar_t
Unsigned char type.
Definition fwd.hpp:34
coord_system_type
Coordinate System type.
Definition coord.hpp:21
film_type
Film value type.
Definition film.hpp:22
film_sensor
Film sensor type.
Definition film.hpp:92
@ SPECTRAL
stores a discretized spectral distribution at each pixel, in addition to RGB (for convenience when vi...
@ GBUFFER
In addition to RGB, stores multiple additional channels that encode information about the visible geo...
@ CANON_EOS_5D
Canon EOS 5D sensor.
@ CANON_EOS_5D_MKIV
Canon EOS 5D MK IV sensor.
@ SONY_ILCE_6400
Sony ILCE 6400 sensor.
@ CANON_EOS_200D
Canon EOS 200D sensor.
@ SONY_ILCE_7RM3
Sony ILCE 7RM3 sensor.
@ CANON_EOS_5D_MKIII
Canon EOS 5D MK III sensor.
@ CANON_EOS_100D
Canon EOS 100D sensor.
@ NIKON_D850
Nikon D850 sensor.
@ CANON_EOS_5D_MKII
Canon EOS 5D MK II sensor.
@ CANON_EOS_M
Canon EOS M sensor.
@ SONY_ILCE_7M3
Sony ILCE 7M3 sensor.
@ NIKON_D810
Nikon D810 sensor.
@ CANON_EOS_5DS
Canon EOS 5DS sensor.
@ HASSELBLAD_L1D_20C
Hasselblad L1D 20C sensor.
@ CANON_EOS_200D_MKII
Canon EOS 200D MK II sensor.
@ SONY_ILCE_9
Sony ILCE 9 sensor.
@ CIE_1931
The CIE 1931 spectral response curves.
@ CANON_EOS_1DX_MKII
Canon EOS 1DX MK II sensor.
@ TPBRT_FILM_SENSOR_SONY_ILCE_6400
Sony ILCE 6400 sensor.
Definition film.h:90
@ TPBRT_FILM_SENSOR_CANON_EOS_1DX_MKII
Canon EOS 1DX MK II sensor.
Definition film.h:66
@ TPBRT_FILM_SENSOR_CANON_EOS_5D_MKII
Canon EOS 5D MK II sensor.
Definition film.h:74
@ TPBRT_FILM_SENSOR_CANON_EOS_100D
Canon EOS 100D sensor.
Definition film.h:64
@ TPBRT_FILM_SENSOR_CANON_EOS_200D
Canon EOS 200D sensor.
Definition film.h:68
@ TPBRT_FILM_SENSOR_SONY_ILCE_7RM3
Sony ILCE 7RM3 sensor.
Definition film.h:94
@ TPBRT_FILM_SENSOR_CANON_EOS_200D_MKII
Canon EOS 200D MK II sensor.
Definition film.h:70
@ TPBRT_FILM_SENSOR_HASSELBLAD_L1D_20C
Hasselblad L1D 20C sensor.
Definition film.h:84
@ TPBRT_FILM_SENSOR_CANON_EOS_5D_MKIV
Canon EOS 5D MK IV sensor.
Definition film.h:78
@ TPBRT_FILM_SENSOR_SONY_ILCE_7M3
Sony ILCE 7M3 sensor.
Definition film.h:92
@ TPBRT_FILM_SENSOR_NIKON_D810
Nikon D810 sensor.
Definition film.h:86
@ TPBRT_FILM_SENSOR_CANON_EOS_M
Canon EOS M sensor.
Definition film.h:82
@ TPBRT_FILM_SENSOR_MAX_NUM
Count of available film sensor types.
Definition film.h:98
@ TPBRT_FILM_SENSOR_NIKON_D850
Nikon D850 sensor.
Definition film.h:88
@ TPBRT_FILM_SENSOR_CANON_EOS_5D_MKIII
Canon EOS 5D MK III sensor.
Definition film.h:76
@ TPBRT_FILM_SENSOR_SONY_ILCE_9
Sony ILCE 9 sensor.
Definition film.h:96
@ TPBRT_FILM_SENSOR_CANON_EOS_5D
Canon EOS 5D sensor.
Definition film.h:72
@ TPBRT_FILM_SENSOR_CIE_1931
The CIE 1931 spectral response curves.
Definition film.h:62
@ TPBRT_FILM_SENSOR_CANON_EOS_5DS
Canon EOS 5DS sensor.
Definition film.h:80
@ TPBRT_FILM_TYPE_RGB
Stores RGB images using the current color space when the Film directive is encountered.
Definition film.h:25
@ TPBRT_FILM_TYPE_GBUFFER
In addition to RGB, stores multiple additional channels that encode information about the visible geo...
Definition film.h:27
@ TPBRT_FILM_TYPE_SPECTRAL
stores a discretized spectral distribution at each pixel, in addition to RGB (for convenience when vi...
Definition film.h:29
@ TPBRT_FILM_TYPE_MAX_NUM
Count of available film types.
Definition film.h:31
tpbrt_uint_t uint_t
Unsigned int type.
Definition fwd.hpp:92
bool bool_t
Bool type.
Definition fwd.hpp:82
tpbrt_float_t float_t
Float type.
Definition fwd.hpp:97
constexpr auto True
True value.
Definition fwd.hpp:20
Definition accelerator.hpp:14
Generic C++ array view with type conversion (a non owning view on memory owned by the C library).
Definition common.hpp:448
C++ wrapper for tpbrt_film_gbuffer_params_t.
Definition film.hpp:54
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition film.hpp:64
constexpr coord_system_type coordinate_system() const noexcept
Returns coordinate_system value.
Definition film.hpp:59
C++ wrapper for tpbrt_film_spectral_params_t.
Definition film.hpp:71
constexpr uint_t nbuckets() const noexcept
Returns nbuckets value.
Definition film.hpp:76
constexpr float_t lambda_max() const noexcept
Returns lambda_max value.
Definition film.hpp:82
constexpr float_t lambda_min() const noexcept
Returns lambda_min value.
Definition film.hpp:79
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition film.hpp:85
C++ wrapper for tpbrt_film_t.
Definition film.hpp:170
constexpr string file_name() const noexcept
Returns file_name value.
Definition film.hpp:187
constexpr variant_type to_variant() const noexcept
Conversion to variant.
Definition film.hpp:235
constexpr pixel_bounds_type pixel_bounds() const noexcept
Returns pixel_bounds value.
Definition film.hpp:184
constexpr bool_t save_fp16() const noexcept
Returns save_fp16 value.
Definition film.hpp:211
constexpr uint_t y_resolution() const noexcept
Returns y_resolution value.
Definition film.hpp:193
constexpr std::optional< film_spectral_params > as_spectral() const noexcept
Returns film parameters as spectral.
Definition film.hpp:229
constexpr float_t white_balance() const noexcept
Returns white_balance value.
Definition film.hpp:202
constexpr bool_t is_spectral() const noexcept
Returns true if type is spectral.
Definition film.hpp:220
constexpr film_type type() const noexcept
Returns type value.
Definition film.hpp:214
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition film.hpp:247
constexpr float_t diagonal() const noexcept
Returns diagonal value.
Definition film.hpp:196
constexpr bool_t is_gbuffer() const noexcept
Returns true if type is gbuffer.
Definition film.hpp:217
constexpr uint_t x_resolution() const noexcept
Returns x_resolution value.
Definition film.hpp:190
constexpr float_t iso() const noexcept
Returns iso value.
Definition film.hpp:199
constexpr std::optional< film_gbuffer_params > as_gbuffer() const noexcept
Returns film parameters as gbuffer.
Definition film.hpp:223
constexpr crop_window_type crop_window() const noexcept
Returns crop_window value.
Definition film.hpp:181
constexpr film_sensor sensor() const noexcept
Returns sensor value.
Definition film.hpp:208
constexpr float_t max_component_value() const noexcept
Returns max_component_value value.
Definition film.hpp:205