Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TReceiverMeasurementEstimator.h
Go to the documentation of this file.
1#pragma once
2
7#include "Math/math_fwd.h"
10
11#include <Common/assertion.h>
12
13#include <vector>
14#include <cstddef>
15#include <utility>
16#include <type_traits>
17
18namespace ph
19{
20
21template<typename SamplingFilmType, typename EstimationType>
23{
24public:
26
28
30 std::size_t numFilms,
31 std::size_t numEstimations,
32 Integrand integrand,
33 SampleFilter filter);
34
36
37 void process(
38 const math::Vector2D& rasterCoord,
39 const Ray& sensedRay,
40 const math::Spectrum& quantityWeight,
41 SampleFlow& sampleFlow) override;
42
43 void addEstimator(const Estimator* estimator);
44 void addFilmEstimation(std::size_t filmIndex, std::size_t estimationIndex);
46 const math::TVector2<int64>& actualResPx,
47 const math::TAABB2D<int64>& effectiveWindowPx,
48 bool useSoftEdge = true);
49 void clearFilms();
50 void clearFilm(std::size_t index);
51 void mergeFilmTo(std::size_t fromIndex, SamplingFilmType& toFilm);
52
53 std::size_t numEstimations() const;
56 bool isSoftEdgedFilm() const;
57
59
60protected:
61 using EstimationToFilmMap = std::vector<std::pair<std::size_t, std::size_t>>;
62
66 std::vector<SamplingFilmType> m_films;
67 std::vector<const Estimator*> m_estimators;
70};
71
72}// end namespace ph
73
Definition IReceivedRayProcessor.h:15
Definition Integrand.h:12
Represents a ray in space.
Definition Ray.h:21
An image reconstruction kernel.
Definition SampleFilter.h:17
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
Definition TEstimationArray.h:13
Definition TIRayEstimator.h:17
Definition TReceiverMeasurementEstimator.h:23
bool isSoftEdgedFilm() const
Definition TReceiverMeasurementEstimator.ipp:174
EstimationToFilmMap m_estimationToFilm
Definition TReceiverMeasurementEstimator.h:69
std::vector< SamplingFilmType > m_films
Definition TReceiverMeasurementEstimator.h:66
void process(const math::Vector2D &rasterCoord, const Ray &sensedRay, const math::Spectrum &quantityWeight, SampleFlow &sampleFlow) override
Definition TReceiverMeasurementEstimator.ipp:51
void clearFilm(std::size_t index)
Definition TReceiverMeasurementEstimator.ipp:108
void addEstimator(const Estimator *estimator)
Definition TReceiverMeasurementEstimator.ipp:74
TReceiverMeasurementEstimator & operator=(TReceiverMeasurementEstimator &&other)
Definition TReceiverMeasurementEstimator.ipp:184
void setFilmDimensions(const math::TVector2< int64 > &actualResPx, const math::TAABB2D< int64 > &effectiveWindowPx, bool useSoftEdge=true)
Definition TReceiverMeasurementEstimator.ipp:128
void addFilmEstimation(std::size_t filmIndex, std::size_t estimationIndex)
Definition TReceiverMeasurementEstimator.ipp:84
SamplingFilmDimensions getFilmDimensions() const
Definition TReceiverMeasurementEstimator.ipp:164
void clearFilms()
Definition TReceiverMeasurementEstimator.ipp:97
SampleFilter m_filter
Definition TReceiverMeasurementEstimator.h:63
std::vector< std::pair< std::size_t, std::size_t > > EstimationToFilmMap
Definition TReceiverMeasurementEstimator.h:61
TEstimationArray< EstimationType > m_estimations
Definition TReceiverMeasurementEstimator.h:64
math::TAABB2D< int64 > getFilmEffectiveWindowPx() const
Definition TReceiverMeasurementEstimator.ipp:154
math::Vector2D m_filmActualResFPx
Definition TReceiverMeasurementEstimator.h:65
std::size_t numEstimations() const
Definition TReceiverMeasurementEstimator.ipp:146
std::vector< const Estimator * > m_estimators
Definition TReceiverMeasurementEstimator.h:67
void mergeFilmTo(std::size_t fromIndex, SamplingFilmType &toFilm)
Definition TReceiverMeasurementEstimator.ipp:118
Integrand m_integrand
Definition TReceiverMeasurementEstimator.h:68
A 2-D Axis-Aligned Bounding Box (AABB).
Definition TAABB2D.h:26
Definition TTristimulusSpectrum.h:11
The root for all renderer implementations.
Definition EEngineProject.h:6
Definition SamplingFilmDimensions.h:12