You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CoreTypes.h"
|
|
#include "Logging/LogMacros.h"
|
|
#include "OverlappingCorners.h"
|
|
|
|
DECLARE_LOG_CATEGORY_EXTERN(LogMeshBuilder, Log, All);
|
|
|
|
class UObject;
|
|
struct FMeshDescription;
|
|
struct FMeshBuildSettings;
|
|
struct FVertexInstanceID;
|
|
struct FMeshReductionSettings;
|
|
|
|
class FMeshDescriptionHelper
|
|
{
|
|
public:
|
|
|
|
FMeshDescriptionHelper(FMeshBuildSettings* InBuildSettings);
|
|
|
|
//Build a render mesh description with the BuildSettings. This will update the RenderMeshDescription in place
|
|
void SetupRenderMeshDescription(UObject* Owner, FMeshDescription& RenderMeshDescription);
|
|
|
|
void ReduceLOD(const FMeshDescription& BaseMesh, FMeshDescription& DestMesh, const struct FMeshReductionSettings& ReductionSettings, const FOverlappingCorners& InOverlappingCorners, float &OutMaxDeviation);
|
|
|
|
void FindOverlappingCorners(const FMeshDescription& MeshDescription, float ComparisonThreshold);
|
|
|
|
const FOverlappingCorners& GetOverlappingCorners() const { return OverlappingCorners; }
|
|
|
|
private:
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//PRIVATE function declarations
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//PRIVATE class members
|
|
|
|
FMeshBuildSettings* BuildSettings;
|
|
FOverlappingCorners OverlappingCorners;
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//INLINE small helper use to optimize search and compare
|
|
|
|
/**
|
|
* Smoothing group interpretation helper structure.
|
|
*/
|
|
struct FFanFace
|
|
{
|
|
int32 FaceIndex;
|
|
int32 LinkedVertexIndex;
|
|
bool bFilled;
|
|
bool bBlendTangents;
|
|
bool bBlendNormals;
|
|
};
|
|
|
|
};
|