Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OmniModulatedEmitter.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <Common/assertion.h>
8#include <Common/primitive_type.h>
9
10#include <memory>
11
12namespace ph
13{
14
16{
17public:
22 explicit OmniModulatedEmitter(const Emitter* source);
23
25 const Emitter* source,
26 EmitterFeatureSet featureSet);
27
28 void evalEmittedEnergy(const SurfaceHit& Xe, math::Spectrum* out_energy) const override;
29
30 void genDirectSample(
32 SampleFlow& sampleFlow,
33 HitProbe& probe) const override;
34
35 void calcDirectPdf(DirectEnergyPdfQuery& query) const override;
36
37 void emitRay(
39 SampleFlow& sampleFlow,
40 HitProbe& probe) const override;
41
42 real calcRadiantFluxApprox() const override;
43
44 void setFilter(const std::shared_ptr<TTexture<math::Spectrum>>& filter);
45
49 const Emitter& getSource() const;
50
51private:
52 const Emitter* m_source;
53 std::shared_ptr<TTexture<math::Spectrum>> m_filter;
54 SphericalMapper m_dirToUv;
55};
56
58{
59 PH_ASSERT(m_source);
60 return *m_source;
61}
62
63}// end namespace ph
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
An electromagnetic energy emitting source. The emitted energy can be captured by a Receiver.
Definition Emitter.h:68
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
Definition OmniModulatedEmitter.h:16
void calcDirectPdf(DirectEnergyPdfQuery &query) const override
Calculate the PDF of direct lighting for a target position.
Definition OmniModulatedEmitter.cpp:82
real calcRadiantFluxApprox() const override
Definition OmniModulatedEmitter.cpp:126
void emitRay(EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
Emit a ray that carries some amount of energy from this emitter.
Definition OmniModulatedEmitter.cpp:94
void genDirectSample(DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
Sample direct lighting for a target position.
Definition OmniModulatedEmitter.cpp:54
void setFilter(const std::shared_ptr< TTexture< math::Spectrum > > &filter)
Definition OmniModulatedEmitter.cpp:120
void evalEmittedEnergy(const SurfaceHit &Xe, math::Spectrum *out_energy) const override
Evaluate emitted energy from a point on the surface.
Definition OmniModulatedEmitter.cpp:33
OmniModulatedEmitter(const Emitter *source)
Given a source, construct its modulated version. Feature set is inherited from source....
Definition OmniModulatedEmitter.cpp:13
const Emitter & getSource() const
Definition OmniModulatedEmitter.h:57
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
Definition SphericalMapper.h:11
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