Template Class perspective_t

Inheritance Relationships

Base Type

Class Documentation

template<bool polarimetric>
class perspective_t : public wt::sensor::film_backed_sensor_t<2, polarimetric>

Simple point perspective sensor. Not a physical sensor.

Template Parameters:

polarimetric – use a polarimetric underlying film

Public Types

using film_t = film_backed_sensor_t<2, polarimetric>::film_t

Public Functions

inline perspective_t(const wt_context_t &ctx, std::string id, transform_t transform, angle_t fov, film_t film, std::uint32_t samples_per_element, bool ray_trace, std::shared_ptr<mask::mask_t> sensor_mask = nullptr, std::optional<f_t> sourcing_tan_alpha = std::nullopt, f_t phase_space_extent_scale = 1) noexcept
perspective_t(perspective_t&&) = default
inline pqvec3_t position() const noexcept
inline dir3_t view_dir() const noexcept
inline dir3_t up_dir() const noexcept
inline Angle auto fov() const noexcept
inline const auto &sensor_extent() const noexcept

Returns the sensor physical extent.

inline const auto &element_extent() const noexcept

Returns a sensor element’s physical extent.

inline Area auto sensor_area() const noexcept

Returns the sensor physical area.

inline SolidAngle auto recp_solid_angle_density_for_sample(const dir3_t &d) const noexcept
inline virtual bool is_delta_position() const noexcept override
inline virtual bool is_delta_direction() const noexcept override
inline beam::sourcing_geometry_t sourcing_geometry(const wavenumber_t k) const noexcept
inline virtual beam::phase_space_extent_t sourcing_beam_extent(const wavenumber_t k) const noexcept override

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

inline QE_area_t radiant_importance(const SolidAngle auto recp_sa_density) const noexcept

Spectral sensitivity is ignored here, the sensor response function is applied when splatting to film.

inline virtual sensor_sample_t sample(sampler::sampler_t &sampler, const vec3u32_t &sensor_element, const wavenumber_t k) const noexcept override

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

Parameters:
  • element – sensor pixel to sample from

  • k – wavenumber

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

Samples a direct connection to a world position.

Parameters:
  • wp – world position

  • k – wavenumber

inline virtual area_sampling_pd_t pdf_position(const pqvec3_t &p) const noexcept override

Sampling PDF of a sensor position.

Parameters:

p – position

inline virtual solid_angle_sampling_pd_t pdf_direction(const pqvec3_t &p, const dir3_t &dir) const noexcept override

Sampling PDF of a direction.

Parameters:
  • p – sensor position

  • dir – direction

virtual scene::element::info_t description() const override

Public Static Functions

static std::shared_ptr<perspective_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)

Protected Functions

inline pqvec3_t point_on_sensor(const vec2_t &film_pos) const noexcept

Computes the sensor position on the near plane. Returns un-normalized results (i.e. z==1)

Parameters:

film_pos – film (pixel) position

inline vec2_t point_on_film(const dir3_t &dir) const noexcept

Computes the film position given a local direction from the sensor.

Parameters:

dir – direction

inline auto direction_pdvx() const noexcept

Partial derivative of camera direction w.r.t. x film coordinate.

inline auto direction_pdvy() const noexcept

Partial derivative of camera direction w.r.t. y film coordinate.

inline importance_intensity_beam_t Se(const ray_t &r, const SolidAngle auto recp_sa_density, const wavenumber_t k) const noexcept

Friends

friend class wt::scene_t