Class sensor_t

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class sensor_t : public wt::scene::scene_element_t

Generic sensor interface. Sensors can be imaging or non-imaging. Sensor elements are partitioned into blocks; blocks are meant to be accessed in parallel by an integrator.

Subclassed by wt::sensor::film_backed_sensor_generic_t< Dims >

Public Functions

inline sensor_t(std::string id, std::uint32_t samples_per_element, bool ray_trace)
sensor_t(sensor_t&&) = default
virtual ~sensor_t() noexcept = default
inline auto ray_trace_only() const noexcept
virtual bool is_polarimetric() const noexcept = 0
virtual const response::response_t *sensor_response() const noexcept = 0
virtual beam::phase_space_extent_t sourcing_beam_extent(const wavenumber_t k) const noexcept = 0

Returns the beam phase-space extent for sourced beams from this sensor for a given wavenumber.

inline auto requested_samples_per_element() const noexcept

Requested integrator samples per sensor element.

virtual const spectrum::spectrum_real_t &sensitivity_spectrum() const noexcept = 0
virtual std::unique_ptr<film_storage_handle_t> create_sensor_film(const wt::wt_context_t &context, sensor_write_flags_e flags) const noexcept = 0

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

virtual vec3u32_t resolution() const noexcept = 0

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

virtual std::size_t total_sensor_blocks() const noexcept = 0

Total number of parallel blocks available for rendering.

virtual block_handle_t acquire_sensor_block(const film_storage_handle_t *storage, std::size_t block_id) const noexcept = 0

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()

virtual void release_sensor_block(const film_storage_handle_t *storage, block_handle_t &&block) const noexcept = 0

Releases a block post rendering. May be not thread safe.

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 = 0

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

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 = 0

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

Parameters:
  • block_handle – image block

  • element – sensor element

  • sample – integrator sample

virtual bool is_delta_position() const noexcept = 0
virtual bool is_delta_direction() const noexcept = 0
virtual sensor_sample_t sample(sampler::sampler_t &sampler, const vec3u32_t &element, const wavenumber_t k) const noexcept = 0

Samples a time-reversed beam (“importance”) around the specified film position.

Parameters:
  • element – sensor element to sample from

  • k – wavenumber

virtual sensor_direct_sample_t sample_direct(sampler::sampler_t &sampler, const pqvec3_t &wp, const wavenumber_t k) const noexcept = 0

Samples a direct connection to a world position.

Parameters:
  • wp – world position

  • k – wavenumber

virtual area_sampling_pd_t pdf_position(const pqvec3_t &p) const noexcept = 0

Sampling PDF of a sensor position.

Parameters:

p – position

virtual solid_angle_sampling_pd_t pdf_direction(const pqvec3_t &p, const dir3_t &dir) const noexcept = 0

Sampling PDF of a direction.

Parameters:
  • p – sensor position

  • dir – direction

Public Static Functions

static inline constexpr std::string scene_element_class() noexcept
static std::shared_ptr<sensor_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)

Friends

friend class wt::scene_t