Template Class film_backed_sensor_t

Inheritance Relationships

Base Type

Derived Type

Class Documentation

template<std::size_t Dims, bool polarimetric>
class film_backed_sensor_t : public wt::sensor::film_backed_sensor_generic_t<Dims>

General interface for sensors supported by an underlying film of arbitrary dimensions.

Subclassed by wt::sensor::virtual_plane_sensor_t

Public Types

using film_t = sensor::film_t<Dims, polarimetric>
using size_t = film_t::size_t

Public Functions

inline film_backed_sensor_t(const wt_context_t &ctx, std::string id, film_t film, std::uint32_t samples_per_element, bool ray_trace, std::shared_ptr<mask::mask_t> sensor_mask = nullptr)
film_backed_sensor_t(film_backed_sensor_t&&) = default
inline const auto &film() const noexcept
inline virtual bool is_polarimetric() const noexcept final
inline virtual const response::response_t *sensor_response() const noexcept override
inline virtual const spectrum::spectrum_real_t &sensitivity_spectrum() const noexcept override
inline virtual std::unique_ptr<film_storage_handle_t> create_sensor_film(const wt_context_t &context, sensor_write_flags_e flags) const noexcept override

Creates the sensor storage. Used as a render target for rendering.

inline virtual vec3u32_t resolution() const noexcept override

Total number of sensor elements (e.g., pixels), per dimension. Returns 1 for unused dimensions.

inline virtual std::size_t total_sensor_blocks() const noexcept override

Total number of parallel blocks available for rendering.

inline virtual block_handle_t acquire_sensor_block(const film_storage_handle_t *storage, std::size_t block_id) const noexcept override

Acquires a block of sensor elements for rendering. May be not thread safe.

Parameters:

block_id – a block index between 0 and total_sensor_blocks()

inline virtual void release_sensor_block(const film_storage_handle_t *storage, block_handle_t &&block) const noexcept override

Releases a block post rendering. Not thread safe.

inline virtual void splat_direct(film_storage_handle_t *storage_ptr, const sensor_element_sample_t &element, const radiant_flux_stokes_t &sample, const wavenumber_t k) const noexcept override

Splats an integrator sample onto the film storage from a thread pool worker. Used for direct sensor sampling techniques. storage must be created with sensor_flags_e::requires_direct_splats. (thread safe, when accessed for a thread pool worker)

Parameters:
  • storage_ptr – film storage to splat to

  • element – sensor element

  • sample – integrator sample

inline virtual 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 override

Splats an integrator sample onto a film block. (splatting is not thread safe)

Parameters:
  • block_handle – film block

  • element – sensor element

  • sample – integrator sample