Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
EmitterSampler.h
Go to the documentation of this file.
1#pragma once
2
3#include "Math/math_fwd.h"
4#include "Utility/TSpan.h"
5
6#include <Common/primitive_type.h>
7
8#include <memory>
9#include <vector>
10
11namespace ph
12{
13
14class Emitter;
15class DirectEnergySampleQuery;
16class DirectEnergyPdfQuery;
17class HitProbe;
18class SurfaceHit;
19class SampleFlow;
20
22{
23public:
24 virtual ~EmitterSampler();
25
26 virtual void update(TSpanView<const Emitter*> emitters) = 0;
27 virtual const Emitter* pickEmitter(SampleFlow& sampleFlow, real* out_PDF) const = 0;
28
32 virtual void genDirectSample(
34 SampleFlow& sampleFlow,
35 HitProbe& probe) const = 0;
36
39 virtual void calcDirectPdf(DirectEnergyPdfQuery& query) const = 0;
40};
41
42}// 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
Definition EmitterSampler.h:22
virtual void calcDirectPdf(DirectEnergyPdfQuery &query) const =0
Calculate the PDF of direct lighting for a target position.
virtual const Emitter * pickEmitter(SampleFlow &sampleFlow, real *out_PDF) const =0
virtual void genDirectSample(DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const =0
Sample direct lighting for a target position.
virtual void update(TSpanView< const Emitter * > emitters)=0
virtual ~EmitterSampler()
Lightweight ray intersection testing and reporting object. If an intersection is found,...
Definition HitProbe.h:27
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
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