Template Class film_t

Nested Relationships

Nested Types

Class Documentation

template<std::size_t Dims, bool polarimetric>
class film_t

General purpose 1/2/3-dimensional array of sensor elements.

Template Parameters:
  • Dims – film dimensions

  • polarimetric – indicates whether film is polarimetric: polarimetric films keep track of the polarization state of the input, quantified via Stokes parameters vectors.

Public Types

using film_storage_type = film_storage_t<polarimetric, Dims>
using FilmSampleT = film_storage_type::T
using film_sample_t = film_storage_type::element_t
using block_t = padded_block_t<film_sample_t, Dims>
using bvec_t = bvec<Dims>
using size_t = vec<Dims, std::uint32_t>
using index_t = vec<Dims, std::int32_t>
using offset_t = vec<Dims, f_t>

Public Functions

inline film_t(const wt::wt_context_t &context, const size_t &size, std::shared_ptr<response::response_t> response, f_t rfilter_stddev, const size_t &block_size, bvec_t flip)

Construct a new film object. ‘Reconstruction’ means splatting the (constant) Gaussian footprint of a sourced beam.

Parameters:
  • rfilter_stddev – standard deviation, in film elements, of Gaussian footprint for beam reconstruction

  • block_size – size of a block, in film elements

film_t(film_t&&) noexcept = default
inline ~film_t() noexcept
inline auto elements() const noexcept
inline std::size_t total_element_count() const noexcept
inline std::unique_ptr<film_storage_handle_t> create_film_storage(const wt::wt_context_t &context, sensor_write_flags_e flags) const noexcept

Creates the sensor storage, that is used as a render target for rendering.

inline block_handle_t acquire_film_block(size_t block_position, sensor_write_flags_e flags) const noexcept

Acquires a film block for rendering. Not thread safe. Lazily caches blocks to avoid unneeded allocations.

Returns:

block_handle_t

inline void release_film_block(block_handle_t &&block, sensor_write_flags_e flags) const noexcept
inline void splat_direct(film_storage_handle_t *storage_handle, const sensor_element_sample_t &element, const radiant_flux_stokes_t &sample, const wavenumber_t k) const noexcept

Splats an integrator sample onto the film storage from a thread pool worker. Used for direct sensor sampling techniques. storage must have been created with sensor_write_flags_e::writes_direct_splats flag. (thread safe)

Parameters:
  • storage_ptr – film storage to splat to

  • element – sensor element

  • sample – integrator sample

inline void splat(const block_handle_t &block_handle, const sensor_element_sample_t &element, const radiant_flux_stokes_t &sample, const wavenumber_t k) const noexcept

Splats an integrator sample onto a film block. storage must have been created with sensor_write_flags_e::writes_block_splats flag. (block expected to be accessed from this thread only)

Parameters:
  • block_handle – film block

  • element – sensor element

  • sample – integrator sample

inline const auto *response() const noexcept
inline bitmap::pixel_layout_t pixel_layout() const noexcept
inline auto dimensions() const noexcept
inline const auto aspect_ratio() const noexcept
inline scene::element::info_t description() const

Public Static Functions

static inline film_t load(scene::loader::loader_t *loader, const scene::loader::node_t &node, f_t rfilter_stddev, const wt::wt_context_t &context)