Plasma Engine  2.0
Loading...
Searching...
No Matches
EditorShapeIconsExtractor.h
1#pragma once
2
3#include <RendererCore/Pipeline/Extractor.h>
4#include <RendererCore/Textures/Texture2DResource.h>
5
7
9{
10 PL_ADD_DYNAMIC_REFLECTION(plEditorShapeIconsExtractor, plExtractor);
11
12public:
13 plEditorShapeIconsExtractor(const char* szName = "EditorShapeIconsExtractor");
15
16 virtual void Extract(
17 const plView& view, const plDynamicArray<const plGameObject*>& visibleObjects, plExtractedRenderData& ref_extractedRenderData) override;
18 virtual plResult Serialize(plStreamWriter& inout_stream) const override;
19 virtual plResult Deserialize(plStreamReader& inout_stream) override;
20
21 void SetSceneContext(plSceneContext* pSceneContext) { m_pSceneContext = pSceneContext; }
22 plSceneContext* GetSceneContext() const { return m_pSceneContext; }
23
24private:
25 void ExtractShapeIcon(const plGameObject* pObject, const plView& view, plExtractedRenderData& extractedRenderData, plRenderData::Category category);
26 const plTypedMemberProperty<plColor>* FindColorProperty(const plRTTI* pRtti) const;
27 const plTypedMemberProperty<plColorGammaUB>* FindColorGammaProperty(const plRTTI* pRtti) const;
28 void FillShapeIconInfo();
29
30 float m_fSize;
31 float m_fMaxScreenSize;
32 plSceneContext* m_pSceneContext;
33
34 struct ShapeIconInfo
35 {
37 const plTypedMemberProperty<plColor>* m_pColorProperty;
38 const plTypedMemberProperty<plColorGammaUB>* m_pColorGammaProperty;
39 plColor m_FallbackColor = plColor::White;
40 };
41
43};
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
static const plColor White
#FFFFFF
Definition Color.h:194
Definition DynamicArray.h:81
Definition EditorShapeIconsExtractor.h:9
virtual void Extract(const plView &view, const plDynamicArray< const plGameObject * > &visibleObjects, plExtractedRenderData &ref_extractedRenderData) override
Definition EditorShapeIconsExtractor.cpp:35
Definition ExtractedRenderData.h:10
Definition Extractor.h:9
This class represents an object inside the world.
Definition GameObject.h:32
Definition HashTable.h:333
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Definition SceneContext.h:25
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
The base class for all typed member properties. I.e. once the type of a property is determined,...
Definition MemberProperty.h:20
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
Definition RenderData.h:19
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54