Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
DiffuseSurfaceEmitterBase.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace ph
8{
9
10class Primitive;
11
15{
16public:
19
20 void evalEmittedEnergy(const SurfaceHit& Xe, math::Spectrum* out_energy) const override = 0;
21
24 SampleFlow& sampleFlow,
25 HitProbe& probe) const override = 0;
26
27 void calcDirectPdf(DirectEnergyPdfQuery& query) const override = 0;
28
29 void emitRay(
31 SampleFlow& sampleFlow,
32 HitProbe& probe) const override = 0;
33
34protected:
36 const TTexture<math::Spectrum>& energy,
37 const SurfaceHit& Xe,
38 math::Spectrum* out_energy) const;
39
46 const Primitive& surface,
47 const TTexture<math::Spectrum>& energy,
49 SampleFlow& sampleFlow,
50 HitProbe& probe) const;
51
58 const Primitive& surface,
59 const TTexture<math::Spectrum>& energy,
61 SampleFlow& sampleFlow,
62 HitProbe& probe) const;
63};
64
65}// end namespace ph
Base for diffusive surface emitters.
Definition DiffuseSurfaceEmitterBase.h:15
void emitRay(EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override=0
Emit a ray that carries some amount of energy from this emitter.
DiffuseSurfaceEmitterBase(EmitterFeatureSet featureSet=defaultFeatureSet)
Definition DiffuseSurfaceEmitterBase.cpp:28
void genDirectSample(DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override=0
Sample direct lighting for a target position.
void evalEmittedEnergy(const SurfaceHit &Xe, math::Spectrum *out_energy) const override=0
Evaluate emitted energy from a point on the surface.
void genDirectSampleFromSurface(const Primitive &surface, const TTexture< math::Spectrum > &energy, DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const
Definition DiffuseSurfaceEmitterBase.cpp:51
void calcDirectPdf(DirectEnergyPdfQuery &query) const override=0
Calculate the PDF of direct lighting for a target position.
void emitRayFromSurface(const Primitive &surface, const TTexture< math::Spectrum > &energy, EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const
Definition DiffuseSurfaceEmitterBase.cpp:91
void evalEnergyFromSurface(const TTexture< math::Spectrum > &energy, const SurfaceHit &Xe, math::Spectrum *out_energy) const
Definition DiffuseSurfaceEmitterBase.cpp:34
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
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
Definition SurfaceEmitter.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 TTexture.h:12
Definition TTristimulusSpectrum.h:11
The root for all renderer implementations.
Definition EEngineProject.h:6