2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2017-08-30 14:06:15 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Modules/ModuleInterface.h"
|
2017-09-01 09:10:06 -04:00
|
|
|
#include "Modules/ModuleManager.h"
|
2020-02-12 13:27:19 -05:00
|
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
|
|
|
#include "Interfaces/ITargetPlatformManagerModule.h"
|
2017-08-30 14:06:15 -04:00
|
|
|
|
|
|
|
|
class IMeshBuilderModule : public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
2020-02-12 13:27:19 -05:00
|
|
|
static inline IMeshBuilderModule& GetForPlatform(const ITargetPlatform* TargetPlatform)
|
2017-08-30 14:06:15 -04:00
|
|
|
{
|
2020-02-12 13:27:19 -05:00
|
|
|
check(TargetPlatform);
|
|
|
|
|
return FModuleManager::LoadModuleChecked<IMeshBuilderModule>(TargetPlatform->GetMeshBuilderModuleName());
|
2017-08-30 14:06:15 -04:00
|
|
|
}
|
|
|
|
|
|
2020-02-12 13:27:19 -05:00
|
|
|
static inline IMeshBuilderModule& GetForRunningPlatform()
|
2017-08-30 14:06:15 -04:00
|
|
|
{
|
2020-02-12 13:27:19 -05:00
|
|
|
const ITargetPlatform* TargetPlatform = GetTargetPlatformManagerRef().GetRunningTargetPlatform();
|
|
|
|
|
return GetForPlatform(TargetPlatform);
|
2017-08-30 14:06:15 -04:00
|
|
|
}
|
|
|
|
|
|
2020-02-12 13:27:19 -05:00
|
|
|
virtual void AppendToDDCKey(FString& DDCKey) { }
|
|
|
|
|
|
2018-04-10 13:20:01 -04:00
|
|
|
virtual bool BuildMesh(class FStaticMeshRenderData& OutRenderData, class UObject* Mesh, const class FStaticMeshLODGroup& LODGroup) { return false; }
|
2019-10-01 20:41:42 -04:00
|
|
|
virtual bool BuildSkeletalMesh(class USkeletalMesh* SkeletalMesh, int32 LODIndex, const bool bRegenDepLODs) { return false; }
|
2017-08-30 14:06:15 -04:00
|
|
|
};
|