Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
AttributeRenderer.h
Go to the documentation of this file.
1#pragma once
2
9#include "Math/TVector2.h"
10
11#include <mutex>
12#include <string>
13
14namespace ph
15{
16
17class Scene;
18class Receiver;
19class SampleGenerator;
20
22{
23public:
24 void doUpdate(const CoreCookedUnit& cooked, const VisualWorld& world) override;
25 void doRender() override;
26 void retrieveFrame(std::size_t layerIndex, HdrRgbFrame& out_frame) override;
27
28 std::size_t asyncPollUpdatedRegions(TSpan<RenderRegionStatus> out_regions) override;
31
32 void asyncPeekFrame(
33 std::size_t layerIndex,
34 const Region& region,
35 HdrRgbFrame& out_frame) override;
36
38
39private:
40 const Scene* m_scene;
41 const Receiver* m_receiver;
42 SampleGenerator* m_sampleGenerator;
43
44 std::string m_attributeName;
45 Vector3Film m_attributeFilm;
46
47 std::mutex m_rendererMutex;
48};
49
50}// end namespace ph
Definition AttributeRenderer.h:22
RenderStats asyncQueryRenderStats() override
Get general information of the ongoing rendering process. More information can be provided by the imp...
Definition AttributeRenderer.cpp:141
void asyncPeekFrame(std::size_t layerIndex, const Region &region, HdrRgbFrame &out_frame) override
Get the intermediate render result. This method is similar to retrieveFrame(), except that correctnes...
Definition AttributeRenderer.cpp:119
std::size_t asyncPollUpdatedRegions(TSpan< RenderRegionStatus > out_regions) override
Get the rendering regions that have been updated. Status of a region will always transition to ERegio...
Definition AttributeRenderer.cpp:101
void retrieveFrame(std::size_t layerIndex, HdrRgbFrame &out_frame) override
Get the rendered result.
Definition AttributeRenderer.cpp:136
void doRender() override
Perform rendering.
Definition AttributeRenderer.cpp:55
RenderProgress asyncQueryRenderProgress() override
Get progress of the ongoing rendering process. Implementation is advised to provide this information ...
Definition AttributeRenderer.cpp:146
void doUpdate(const CoreCookedUnit &cooked, const VisualWorld &world) override
Perform necessary updates for rendering. No asynchronous operation is allowed during update.
Definition AttributeRenderer.cpp:36
RenderObservationInfo getObservationInfo() const override
Get information about available transient outputs of an ongoing render operation. This information wi...
Definition AttributeRenderer.cpp:151
Definition CoreCookedUnit.h:19
A target that can receive any physical quantity, typically electromagnetic energy....
Definition Receiver.h:22
Meta information for data related to ongoing render operation.
Definition RenderObservationInfo.h:15
Definition RenderProgress.h:12
Definition RenderStats.h:12
Definition Renderer.h:39
Generates samples in [0, 1]. Generators of different types produces samples with different properties...
Definition SampleGenerator.h:35
A unified interface for accessing cooked content in a visual world.
Definition Scene.h:27
A film that records 3-D vectors.
Definition Vector3Film.h:18
A virtual world for image synthesis.
Definition VisualWorld.h:34
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< T, EXTENT > TSpan
A contiguous sequence of objects of type T. Effectively the same as std::span.
Definition TSpan.h:12