Plasma Engine  2.0
Loading...
Searching...
No Matches
DecalAssetManager.h
1#pragma once
2
3#include <EditorFramework/Assets/AssetDocumentManager.h>
4#include <Foundation/Types/Status.h>
5
7{
8 PL_ADD_DYNAMIC_REFLECTION(plDecalAssetDocumentManager, plAssetDocumentManager);
9
10public:
13
14 virtual void AddEntriesToAssetTable(
15 plStringView sDataDirectory, const plPlatformProfile* pAssetProfile, plDelegate<void(plStringView sGuid, plStringView sPath, plStringView sType)> addEntry) const override;
16 virtual plString GetAssetTableEntry(
17 const plSubAsset* pSubAsset, plStringView sDataDirectory, const plPlatformProfile* pAssetProfile) const override;
18
21 plString GetDecalTexturePath(const plPlatformProfile* pAssetProfile) const;
22
23private:
24 void OnDocumentManagerEvent(const plDocumentManager::Event& e);
25 bool IsDecalTextureUpToDate(const char* szDecalFile, plUInt64 uiAssetHash) const;
26 plStatus RunTexConv(const char* szTargetFile, const char* szInputFile, const plAssetFileHeader& AssetHeader);
27
28 virtual void InternalCreateDocument(
29 plStringView sDocumentTypeName, plStringView sPath, bool bCreateNewDocument, plDocument*& out_pDocument, const plDocumentObject* pOpenContext) override;
30 virtual void InternalGetSupportedDocumentTypes(plDynamicArray<const plDocumentTypeDescriptor*>& inout_DocumentTypes) const override;
31
32 virtual bool GeneratesProfileSpecificAssets() const override { return true; }
33
34 virtual plUInt64 ComputeAssetProfileHashImpl(const plPlatformProfile* pAssetProfile) const override;
35
37};
Definition AssetDocumentManager.h:13
Simple class to handle asset file headers (the very first bytes in all transformed asset files)
Definition AssetFileHeader.h:8
Definition DecalAssetManager.h:7
plStatus GenerateDecalTexture(const plPlatformProfile *pAssetProfile)
There is only a single decal texture per project. This function creates it, in case any decal asset w...
Definition DecalAssetManager.cpp:97
Definition Document.h:57
Definition DocumentObjectBase.h:11
Definition DynamicArray.h:81
Definition PlatformProfile.h:25
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Definition Declarations.h:89
A generic delegate class which supports static functions and member functions.
Definition Delegate.h:76
Definition DocumentManager.h:65
An plResult with an additional message for the reason of failure.
Definition Status.h:12
Information about an asset or sub-asset.
Definition AssetCurator.h:107