69 lines
2.0 KiB
C++
69 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "MuR/Ptr.h"
|
|
#include "MuR/Model.h"
|
|
#include "MuR/Parameters.h"
|
|
#include "Engine/SkeletalMesh.h"
|
|
#include "CoreMinimal.h"
|
|
#include "MuCO/CustomizableObjectPrivate.h"
|
|
#include "MuR/ResourceID.h"
|
|
|
|
#include "CustomizableObjectSkeletalMesh.generated.h"
|
|
|
|
#define UE_API CUSTOMIZABLEOBJECT_API
|
|
|
|
class UCustomizableObjectInstance;
|
|
class UCustomizableObject;
|
|
class UCustomizableInstancePrivate;
|
|
class FUpdateContextPrivate;
|
|
class FCustomizableObjectMeshStreamIn;
|
|
struct FModelStreamableBulkData;
|
|
class FUnrealMutableResourceProvider;
|
|
|
|
|
|
/**
|
|
* CustomizableObjectSkeletalMesh is a class inheriting from USkeletalMesh with the sole purpose of allowing skeletal meshes generated by Mutable
|
|
* to stream-in Mesh LODs.
|
|
*/
|
|
UCLASS(MinimalAPI)
|
|
class UCustomizableObjectSkeletalMesh : public USkeletalMesh
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
friend FCustomizableObjectMeshStreamIn;
|
|
friend UCustomizableInstancePrivate;
|
|
friend FMeshCache;
|
|
|
|
UE_API void InitMutableStreamingData(const TSharedRef<FUpdateContextPrivate>& InOperationData, const FName& ComponentName, const int32 FirstLOD, const int32 LODCount);
|
|
|
|
//~ Begin UStreamableRenderAsset Interface.
|
|
UE_API virtual bool StreamIn(int32 NewMipCount, bool bHighPrio) override;
|
|
//~ End UStreamableRenderAsset Interface.
|
|
|
|
FString CustomizableObjectPathName;
|
|
|
|
TSharedPtr<FModelStreamableBulkData> ModelStreamableBulkData;
|
|
|
|
TSharedPtr<UE::Mutable::Private::FModel> Model;
|
|
TSharedPtr<UE::Mutable::Private::FMeshIdRegistry> MeshIdRegistry;
|
|
TSharedPtr<UE::Mutable::Private::FImageIdRegistry> ImageIdRegistry;
|
|
TSharedPtr<UE::Mutable::Private::FMaterialIdRegistry> MaterialIdRegistry;
|
|
|
|
TSharedPtr<FUnrealMutableResourceProvider> ExternalResourceProvider;
|
|
|
|
/** Instance parameters at the time of creation. */
|
|
TSharedPtr<UE::Mutable::Private::FParameters> Parameters;
|
|
int32 State = -1;
|
|
|
|
/** Mesh IDs per LOD */
|
|
TArray<UE::Mutable::Private::FMeshId> MeshIDs;
|
|
TArray<TArray<uint32>> SurfaceIDs;
|
|
TArray<TPair<uint32, FName>> SkinWeightProfileIDs;
|
|
|
|
FMeshCache::FId MeshCacheId;
|
|
};
|
|
|
|
#undef UE_API
|