Plasma Engine  2.0
Loading...
Searching...
No Matches
PostProcessingComponent.h
1#pragma once
2
3#include <Core/World/World.h>
4#include <GameEngine/Volumes/VolumeSampler.h>
5#include <RendererCore/Pipeline/Declarations.h>
6
7class PL_GAMEENGINE_DLL plPostProcessingComponentManager : public plComponentManager<class plPostProcessingComponent, plBlockStorageType::Compact>
8{
9public:
11
12 virtual void Initialize() override;
13
14private:
15 void UpdateComponents(const UpdateContext& context);
16};
17
19{
20 plHashedString m_sRenderPassName;
21 plHashedString m_sPropertyName;
22 plHashedString m_sVolumeValueName;
23 plVariant m_DefaultValue;
24 plTime m_InterpolationDuration;
25
26 plResult Serialize(plStreamWriter& inout_stream) const;
27 plResult Deserialize(plStreamReader& inout_stream);
28};
29
30PL_DECLARE_REFLECTABLE_TYPE(PL_GAMEENGINE_DLL, plPostProcessingValueMapping);
31
36class PL_GAMEENGINE_DLL plPostProcessingComponent : public plComponent
37{
39
40public:
45
46 virtual void Initialize() override;
47 virtual void Deinitialize() override;
48
49 virtual void OnActivated() override;
50 virtual void OnDeactivated() override;
51
52 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
53 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
54
55 void SetVolumeType(const char* szType); // [ property ]
56 const char* GetVolumeType() const; // [ property ]
57
58private:
59 plUInt32 Mappings_GetCount() const { return m_Mappings.GetCount(); } // [ property ]
60 const plPostProcessingValueMapping& Mappings_GetMapping(plUInt32 i) const { return m_Mappings[i]; } // [ property ]
61 void Mappings_SetMapping(plUInt32 i, const plPostProcessingValueMapping& mapping); // [ property ]
62 void Mappings_Insert(plUInt32 uiIndex, const plPostProcessingValueMapping& mapping); // [ property ]
63 void Mappings_Remove(plUInt32 uiIndex); // [ property ]
64
65 plView* FindView() const;
66 void RegisterSamplerValues();
67 void ResetViewProperties();
68 void SampleAndSetViewProperties();
69
70 plComponentHandle m_hCameraComponent;
73 plSpatialData::Category m_SpatialCategory = plInvalidSpatialDataCategory;
74};
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
Definition DynamicArray.h:81
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
A component that sets the configured values on a render pipeline and optionally samples those values ...
Definition PostProcessingComponent.h:37
Definition PostProcessingComponent.h:8
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
virtual void Initialize()
This method is called after the constructor. A derived type can override this method to do initializa...
Definition WorldModule.h:98
virtual void Deinitialize()
This method is called before the destructor. A derived type can override this method to do deinitiali...
Definition WorldModule.h:101
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
A handle to a component.
Definition Declarations.h:138
Definition PostProcessingComponent.h:19
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition SpatialData.h:27
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
Definition WorldModule.h:33