Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
PathTracingVisualizer.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/TVector2.h"
6#include "SDL/sdl_interface.h"
10
11#include <Common/primitive_type.h>
12
13#include <memory>
14
15namespace ph { class IRayEnergyEstimator; }
16namespace ph { class SampleFilter; }
17
18namespace ph
19{
20
22{
23public:
24 void cook(const CoreCookingContext& ctx, CoreCookedUnit& cooked) override;
25
29
30protected:
32 std::unique_ptr<IRayEnergyEstimator> makeEstimator() const;
33
34private:
35 EScheduler m_scheduler;
36 ERayEnergyEstimator m_estimator;
37 ESampleFilter m_sampleFilter;
38
39public:
41 {
42 ClassType clazz("path-tracing");
43 clazz.docName("Path Tracing Visualizer");
44 clazz.description("Render frames with common path tracing methods.");
45 clazz.baseOn<FrameVisualizer>();
46
47 TSdlEnumField<OwnerType, EScheduler> scheduler("scheduler", &OwnerType::m_scheduler);
48 scheduler.description("Scheduler for rendering, affect the order of rendered regions.");
49 scheduler.defaultTo(EScheduler::SpiralGrid);
50 scheduler.optional();
51 clazz.addField(scheduler);
52
53 TSdlEnumField<OwnerType, ERayEnergyEstimator> estimator("estimator", &OwnerType::m_estimator);
54 estimator.description("The energy estimating component used by the visualizer.");
56 estimator.optional();
57 clazz.addField(estimator);
58
59 TSdlEnumField<OwnerType, ESampleFilter> sampleFilter("sample-filter", &OwnerType::m_sampleFilter);
60 sampleFilter.description("Sample filter for the film sampling process.");
62 sampleFilter.optional();
63 clazz.addField(sampleFilter);
64
65 return clazz;
66 }
67};
68
69// In-header Implementations:
70
72{
73 return m_scheduler;
74}
75
77{
78 return m_estimator;
79}
80
82{
83 return m_sampleFilter;
84}
85
86}// end namespace ph
Definition CoreCookedUnit.h:19
Definition CoreCookingContext.h:15
Definition FrameVisualizer.h:16
Definition PathTracingVisualizer.h:22
std::unique_ptr< IRayEnergyEstimator > makeEstimator() const
Definition PathTracingVisualizer.cpp:59
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< PathTracingVisualizer >)
Definition PathTracingVisualizer.h:40
void cook(const CoreCookingContext &ctx, CoreCookedUnit &cooked) override
Definition PathTracingVisualizer.cpp:18
ESampleFilter getSampleFilter() const
Definition PathTracingVisualizer.h:81
ERayEnergyEstimator getEstimator() const
Definition PathTracingVisualizer.h:76
EScheduler getScheduler() const
Definition PathTracingVisualizer.h:71
SampleFilter makeSampleFilter() const
Definition PathTracingVisualizer.cpp:38
An image reconstruction kernel.
Definition SampleFilter.h:17
Definition TSdlEnumField.h:23
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
The root for all renderer implementations.
Definition EEngineProject.h:6
ESampleFilter
Definition sdl_sample_filter_type.h:9
ERayEnergyEstimator
Definition sdl_ray_energy_estimator_type.h:9
EScheduler
Definition EScheduler.h:7