Plasma Engine  2.0
Loading...
Searching...
No Matches
SkyLightComponent.h
1#pragma once
2
3#include <Core/World/SettingsComponent.h>
4#include <Core/World/SettingsComponentManager.h>
5#include <RendererCore/Lights/Implementation/ReflectionProbeData.h>
6#include <RendererCore/Textures/TextureCubeResource.h>
7
11
13
14class PL_RENDERERCORE_DLL plSkyLightComponent : public plSettingsComponent
15{
17
19 // plComponent
20
21public:
22 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
23 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
24
25protected:
26 virtual void OnActivated() override;
27 virtual void OnDeactivated() override;
28
29
31 // plSkyLightComponent
32
33public:
36
37 void SetReflectionProbeMode(plEnum<plReflectionProbeMode> mode); // [ property ]
38 plEnum<plReflectionProbeMode> GetReflectionProbeMode() const; // [ property ]
39
40 void SetIntensity(float fIntensity); // [ property ]
41 float GetIntensity() const; // [ property ]
42
43 void SetSaturation(float fSaturation); // [ property ]
44 float GetSaturation() const; // [ property ]
45
46 const plTagSet& GetIncludeTags() const; // [ property ]
47 void InsertIncludeTag(const char* szTag); // [ property ]
48 void RemoveIncludeTag(const char* szTag); // [ property ]
49
50 const plTagSet& GetExcludeTags() const; // [ property ]
51 void InsertExcludeTag(const char* szTag); // [ property ]
52 void RemoveExcludeTag(const char* szTag); // [ property ]
53
54 void SetShowDebugInfo(bool bShowDebugInfo); // [ property ]
55 bool GetShowDebugInfo() const; // [ property ]
56
57 void SetShowMipMaps(bool bShowMipMaps); // [ property ]
58 bool GetShowMipMaps() const; // [ property ]
59
60 void SetCubeMapFile(const char* szFile); // [ property ]
61 const char* GetCubeMapFile() const; // [ property ]
62 plTextureCubeResourceHandle GetCubeMap() const
63 {
64 return m_hCubeMap;
65 }
66
67 float GetNearPlane() const { return m_Desc.m_fNearPlane; } // [ property ]
68 void SetNearPlane(float fNearPlane); // [ property ]
69
70 float GetFarPlane() const { return m_Desc.m_fFarPlane; } // [ property ]
71 void SetFarPlane(float fFarPlane); // [ property ]
72
73protected:
74 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg);
75 void OnMsgExtractRenderData(plMsgExtractRenderData& msg) const;
76 void OnTransformChanged(plMsgTransformChanged& msg);
77
80
82
83 mutable bool m_bStatesDirty = true;
84};
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
virtual void OnActivated()
This method is called when the component gets activated.
Definition Component.cpp:140
Base class for settings components, of which only one per type should exist in each world.
Definition SettingsComponent.h:13
A component manager that does no update at all on components and expects only a single instance to be...
Definition SettingsComponentManager.h:14
Definition SkyLightComponent.h:15
A dynamic collection of tags featuring fast lookups.
Definition TagSet.h:23
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 custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition RenderData.h:116
Definition TransformChangedMessage.h:7
Definition UpdateLocalBoundsMessage.h:9
Describes how a cube map should be generated.
Definition ReflectionProbeData.h:24