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
6
class
plSceneContext
;
7
8
class
plEditorShapeIconsExtractor
:
public
plExtractor
9
{
10
PL_ADD_DYNAMIC_REFLECTION(
plEditorShapeIconsExtractor
,
plExtractor
);
11
12
public
:
13
plEditorShapeIconsExtractor
(
const
char
* szName =
"EditorShapeIconsExtractor"
);
14
~plEditorShapeIconsExtractor
();
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
24
private
:
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
{
36
plTexture2DResourceHandle
m_hTexture;
37
const
plTypedMemberProperty<plColor>
* m_pColorProperty;
38
const
plTypedMemberProperty<plColorGammaUB>
* m_pColorGammaProperty;
39
plColor
m_FallbackColor =
plColor::White
;
40
};
41
42
plHashTable<const plRTTI*, ShapeIconInfo>
m_ShapeIconInfos;
43
};
plColor
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition
Color.h:44
plColor::White
static const plColor White
#FFFFFF
Definition
Color.h:194
plDynamicArray
Definition
DynamicArray.h:81
plEditorShapeIconsExtractor
Definition
EditorShapeIconsExtractor.h:9
plEditorShapeIconsExtractor::Extract
virtual void Extract(const plView &view, const plDynamicArray< const plGameObject * > &visibleObjects, plExtractedRenderData &ref_extractedRenderData) override
Definition
EditorShapeIconsExtractor.cpp:35
plExtractedRenderData
Definition
ExtractedRenderData.h:10
plExtractor
Definition
Extractor.h:9
plGameObject
This class represents an object inside the world.
Definition
GameObject.h:32
plHashTable
Definition
HashTable.h:333
plRTTI
This class holds information about reflected types. Each instance represents one type that is known t...
Definition
RTTI.h:30
plSceneContext
Definition
SceneContext.h:25
plStreamReader
Interface for binary in (read) streams.
Definition
Stream.h:22
plStreamWriter
Interface for binary out (write) streams.
Definition
Stream.h:107
plTypedMemberProperty
The base class for all typed member properties. I.e. once the type of a property is determined,...
Definition
MemberProperty.h:20
plTypedResourceHandle< class plTexture2DResource >
plView
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition
View.h:21
plRenderData::Category
Definition
RenderData.h:19
plResult
Default enum for returning failure or success, instead of using a bool.
Definition
Types.h:54
Code
EditorPlugins
Scene
EnginePluginScene
RenderPipeline
EditorShapeIconsExtractor.h
Generated by
1.11.0