8#include <Common/assertion.h>
58 std::vector<const Primitive*> m_surfaces;
59 std::shared_ptr<TTexture<math::Spectrum>> m_emittedEnergy;
64 return m_surfaces.size();
68 const std::size_t surfaceIdx)
const
70 PH_ASSERT_LT(surfaceIdx, m_surfaces.size());
71 return *m_surfaces[surfaceIdx];
76 PH_ASSERT(m_emittedEnergy);
77 return *m_emittedEnergy;
Base for diffusive surface emitters.
Definition DiffuseSurfaceEmitterBase.h:15
Information for the probability of generating a specific sample for direct energy estimation.
Definition DirectEnergyPdfQuery.h:81
Information for generating a sample for direct energy estimation.
Definition DirectEnergySampleQuery.h:89
static constexpr auto defaultFeatureSet
Definition Emitter.h:70
Information for generating a sample for energy emission.
Definition EnergyEmissionSampleQuery.h:63
Diffusive surface emitter comprised of multiple surface fragments. All surface fragments use the same...
Definition GroupedDiffuseSurfaceEmitter.h:23
const Primitive & getSurface(std::size_t surfaceIdx) const
Get a surface fragment by index.
Definition GroupedDiffuseSurfaceEmitter.h:67
void genDirectSample(DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
Sample direct lighting for a target position.
Definition GroupedDiffuseSurfaceEmitter.cpp:58
const TTexture< math::Spectrum > & getEmittedEnergy() const
Definition GroupedDiffuseSurfaceEmitter.h:74
real calcRadiantFluxApprox() const override
Definition GroupedDiffuseSurfaceEmitter.cpp:110
void evalEmittedEnergy(const SurfaceHit &Xe, math::Spectrum *out_energy) const override
Evaluate emitted energy from a point on the surface.
Definition GroupedDiffuseSurfaceEmitter.cpp:53
GroupedDiffuseSurfaceEmitter(TSpanView< const Primitive * > surfaces, const std::shared_ptr< TTexture< math::Spectrum > > &emittedEnergy, EmitterFeatureSet featureSet=defaultFeatureSet)
Definition GroupedDiffuseSurfaceEmitter.cpp:18
void calcDirectPdf(DirectEnergyPdfQuery &query) const override
Calculate the PDF of direct lighting for a target position.
Definition GroupedDiffuseSurfaceEmitter.cpp:80
std::size_t numSurfaces() const
Definition GroupedDiffuseSurfaceEmitter.h:62
void emitRay(EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
Emit a ray that carries some amount of energy from this emitter.
Definition GroupedDiffuseSurfaceEmitter.cpp:86
Lightweight ray intersection testing and reporting object. If an intersection is found,...
Definition HitProbe.h:27
A physical shape in the scene.
Definition Primitive.h:23
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
General information about a ray-surface intersection event.
Definition SurfaceHit.h:59
Manipulate a value type where each bit is a binary flag.
Definition TBitFlags.h:17
Definition TTristimulusSpectrum.h:11
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19