infinite emitters¶
-
class infinite_emitter_t : public wt::emitter::emitter_t
Generic interface for infinite emitters. Sampling of infinite emitters is slightly different compared with regular emitters. During construction,
wt::scene_t
populates the scene-wide bounding AABBworld_aabb
of all infinite emitters. The infinite emitters’ sampling API changes as follows:wt::emitter::emitter_t::sample_position()
andwt::emitter::emitter_t::pdf_position()
are unused and return 0.wt::emitter::emitter_t::sample()
samples with respect to positions within theworld_aabb
, and not with respect to positions upon the emitter.An alternative density query
wt::emitter::infinite_emitter_t::pdf_target_position()
provides the area sampling density for sampled world positions.
Subclassed by wt::emitter::directional_t
Public Functions
-
inline infinite_emitter_t(std::string id, f_t emitter_phase_space_extent_scale = 1)
-
infinite_emitter_t(const infinite_emitter_t&) = default
-
infinite_emitter_t(infinite_emitter_t&&) = default
-
inline virtual bool is_infinite_emitter() const noexcept final
-
virtual area_sampling_pd_t pdf_target_position(const pqvec3_t &wp) const noexcept = 0
Sampling area PDF of a target scene position, sampled by the infinite emitter’s
sample()
.- Parameters:
wp – sampled scene position
-
inline virtual position_sample_t sample_position(sampler::sampler_t &sampler) const noexcept final
Samples an emission phase-space position (ray) on the light source. Not implemented for infinite emitters.
-
inline virtual area_sampling_pd_t pdf_position(const pqvec3_t &p, const intersection_surface_t *surface = nullptr) const noexcept final
Sampling PDF of an emission position on the light source. Not implemented for infinite emitters.
Friends
- friend class wt::scene_t