Plasma Engine  2.0
Loading...
Searching...
No Matches
LayerContext.h
1#pragma once
2
3#include <EditorEngineProcessFramework/EngineProcess/EngineProcessDocumentContext.h>
4#include <EnginePluginScene/EnginePluginSceneDLL.h>
5#include <RendererCore/Pipeline/Declarations.h>
6#include <SharedPluginScene/Common/Messages.h>
7
9
11class PL_ENGINEPLUGINSCENE_DLL plLayerContext : public plEngineProcessDocumentContext
12{
13 PL_ADD_DYNAMIC_REFLECTION(plLayerContext, plEngineProcessDocumentContext);
14
15public:
16 static plEngineProcessDocumentContext* AllocateContext(const plDocumentOpenMsgToEngine* pMsg);
19
20 virtual void HandleMessage(const plEditorEngineDocumentMsg* pMsg) override;
21 void SceneDeinitialized();
22 const plTag& GetLayerTag() const;
23
24protected:
25 virtual void OnInitialize() override;
26 virtual void OnDeinitialize() override;
27
29 virtual void DestroyViewContext(plEngineProcessViewContext* pContext) override;
30 virtual plStatus ExportDocument(const plExportDocumentMsgToEngine* pMsg) override;
31
32 virtual void UpdateDocumentContext() override;
33
34private:
35 plSceneContext* m_pParentSceneContext = nullptr;
36 plTag m_LayerTag;
37};
Definition EngineProcessMessages.h:218
Base class for all messages that are tied to some document.
Definition EngineProcessMessages.h:151
A document context is the counter part to an editor document on the engine side.
Definition EngineProcessDocumentContext.h:42
virtual plStatus ExportDocument(const plExportDocumentMsgToEngine *pMsg)
Exports to current document resource to file. Make sure to write plAssetFileHeader at the start of it...
Definition EngineProcessDocumentContext.cpp:506
virtual plEngineProcessViewContext * CreateViewContext()=0
Needs to be implemented to create a view context used for windows and thumbnails rendering.
virtual void DestroyViewContext(plEngineProcessViewContext *pContext)=0
Needs to be implemented to destroy the view context created in CreateViewContext.
virtual void UpdateDocumentContext()
A tick functions that allows each document context to do processing that continues over multiple fram...
Definition EngineProcessDocumentContext.cpp:410
Represents the view/window on the engine process side, holds all data necessary for rendering.
Definition EngineProcessViewContext.h:54
Definition EngineProcessMessages.h:307
Layers that are loaded as sub-documents of a scene share the plWorld with their main document scene....
Definition LayerContext.h:12
Definition SceneContext.h:25
The tag class stores the necessary lookup information for a single tag which can be used in conjuncti...
Definition Tag.h:16
An plResult with an additional message for the reason of failure.
Definition Status.h:12