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
|
|
|
|
2020-07-06 18:58:26 -04:00
|
|
|
struct FStaticMeshBuildVertex;
|
|
|
|
|
struct FStaticMeshSection;
|
|
|
|
|
class FStaticMeshSectionArray;
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2022-01-26 08:33:22 -05:00
|
|
|
virtual void AppendToDDCKey(FString& DDCKey, bool bSkeletal) { }
|
2020-02-12 13:27:19 -05:00
|
|
|
|
2021-08-26 07:30:04 -04:00
|
|
|
virtual bool BuildMesh(class FStaticMeshRenderData& OutRenderData, class UObject* Mesh, const class FStaticMeshLODGroup& LODGroup, bool bGenerateCoarseMeshStreamingLODs) = 0;
|
2020-07-06 18:58:26 -04:00
|
|
|
|
2021-06-10 11:46:03 -04:00
|
|
|
virtual bool BuildMeshVertexPositions(class UObject* StaticMesh, TArray<uint32>& Indices, TArray<FVector3f>& Vertices) = 0;
|
2021-05-17 14:30:51 -04:00
|
|
|
|
|
|
|
|
virtual bool BuildSkeletalMesh(const struct FSkeletalMeshBuildParameters& SkeletalMeshBuildParameters) = 0;
|
2020-10-26 13:09:34 -04:00
|
|
|
|
2020-12-11 14:21:20 -04:00
|
|
|
virtual void PostBuildSkeletalMesh(class FSkeletalMeshRenderData* SkeletalMeshRenderData, class USkeletalMesh* SkeletalMesh) { }
|
2017-08-30 14:06:15 -04:00
|
|
|
};
|