Plasma Engine  2.0
Loading...
Searching...
No Matches
BoxReflectionProbeComponent.h
1#pragma once
2
3#include <RendererCore/Lights/ReflectionProbeComponentBase.h>
4
5class PL_RENDERERCORE_DLL plBoxReflectionProbeComponentManager final : public plComponentManager<class plBoxReflectionProbeComponent, plBlockStorageType::Compact>
6{
7public:
9};
10
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 // plBoxReflectionProbeComponent
32
33public:
36
37 const plVec3& GetExtents() const; // [ property ]
38 void SetExtents(const plVec3& vExtents); // [ property ]
39
40 const plVec3& GetInfluenceScale() const; // [ property ]
41 void SetInfluenceScale(const plVec3& vInfluenceScale); // [ property ]
42 const plVec3& GetInfluenceShift() const; // [ property ]
43 void SetInfluenceShift(const plVec3& vInfluenceShift); // [ property ]
44
45 void SetPositiveFalloff(const plVec3& vFalloff); // [ property ]
46 const plVec3& GetPositiveFalloff() const { return m_vPositiveFalloff; } // [ property ]
47 void SetNegativeFalloff(const plVec3& vFalloff); // [ property ]
48 const plVec3& GetNegativeFalloff() const { return m_vNegativeFalloff; } // [ property ]
49
50 void SetBoxProjection(bool bBoxProjection); // [ property ]
51 bool GetBoxProjection() const { return m_bBoxProjection; } // [ property ]
52
53protected:
55 // Editor
56 void OnObjectCreated(const plAbstractObjectNode& node);
57
58protected:
59 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg);
60 void OnMsgExtractRenderData(plMsgExtractRenderData& msg) const;
61 void OnTransformChanged(plMsgTransformChanged& msg);
62
63protected:
64 plVec3 m_vExtents = plVec3(5.0f);
65 plVec3 m_vInfluenceScale = plVec3(1.0f);
66 plVec3 m_vInfluenceShift = plVec3(0.0f);
67 plVec3 m_vPositiveFalloff = plVec3(0.1f, 0.1f, 0.0f);
68 plVec3 m_vNegativeFalloff = plVec3(0.1f, 0.1f, 0.0f);
69 bool m_bBoxProjection = true;
70};
71
74{
76
77public:
79
80 plBoxReflectionProbeVisualizerAttribute(const char* szExtentsProperty, const char* szInfluenceScaleProperty, const char* szInfluenceShiftProperty);
81
82 const plUntrackedString& GetExtentsProperty() const { return m_sProperty1; }
83 const plUntrackedString& GetInfluenceScaleProperty() const { return m_sProperty2; }
84 const plUntrackedString& GetInfluenceShiftProperty() const { return m_sProperty3; }
85};
Definition AbstractObjectGraph.h:17
Box reflection probe component.
Definition BoxReflectionProbeComponent.h:15
Definition BoxReflectionProbeComponent.h:6
A special visualizer attribute for box reflection probes.
Definition BoxReflectionProbeComponent.h:74
Definition ComponentManager.h:88
Base class for all reflection probes.
Definition ReflectionProbeComponentBase.h:13
Definition PropertyAttributes.h:780
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
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
Definition RenderData.h:116
Definition TransformChangedMessage.h:7
Definition UpdateLocalBoundsMessage.h:9