Plasma Engine  2.0
Loading...
Searching...
No Matches
SkeletonContext.h
1#pragma once
2
3#include <EditorEngineProcessFramework/EngineProcess/EngineProcessDocumentContext.h>
4#include <EnginePluginAssets/EnginePluginAssetsDLL.h>
5#include <RendererCore/AnimationSystem/SkeletonResource.h>
6#include <RendererCore/Declarations.h>
7
8class PL_ENGINEPLUGINASSETS_DLL plSkeletonContext : public plEngineProcessDocumentContext
9{
10 PL_ADD_DYNAMIC_REFLECTION(plSkeletonContext, plEngineProcessDocumentContext);
11
12public:
14
15 virtual void HandleMessage(const plEditorEngineDocumentMsg* pMsg) override;
16
17 plSkeletonResourceHandle GetSkeleton() const { return m_hSkeleton; }
18
19 bool m_bDisplayGrid = true;
20
21protected:
22 virtual void OnInitialize() override;
23
25 virtual void DestroyViewContext(plEngineProcessViewContext* pContext) override;
26 virtual bool UpdateThumbnailViewContext(plEngineProcessViewContext* pThumbnailViewContext) override;
27
28private:
29 void QuerySelectionBBox(const plEditorEngineDocumentMsg* pMsg);
30
31 plGameObject* m_pGameObject = nullptr;
32 plSkeletonResourceHandle m_hSkeleton;
33 plComponentHandle m_hSkeletonComponent;
34 plComponentHandle m_hPoseComponent;
35 plString m_sAnimatedMeshToUse;
36 plComponentHandle m_hAnimMeshComponent;
37};
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 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 bool UpdateThumbnailViewContext(plEngineProcessViewContext *pThumbnailViewContext)
Overwrite this function to apply the thumbnail render settings to the given context.
Definition EngineProcessDocumentContext.cpp:603
Represents the view/window on the engine process side, holds all data necessary for rendering.
Definition EngineProcessViewContext.h:54
This class represents an object inside the world.
Definition GameObject.h:32
Definition SkeletonContext.h:9
A handle to a component.
Definition Declarations.h:138