Files
tyson brochu 3c7af3d0bd AutoLOD: Pass EvaluationInfo to node ProcessMesh functions. Make GenerateUVs and GenerateConvexHullMesh cancellable.
#rnx
#rb rinat.abdrashitov
#preflight 614cb58d88dbdb000179f1cf

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 17611355 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17611364 by tyson brochu in ue5-release-engine-test branch]
2021-09-23 14:25:03 -04:00

69 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MeshProcessingNodes/MeshProcessingBaseNodes.h"
#include "MeshProcessingNodes/MeshProcessingDataTypes.h"
namespace UE
{
namespace GeometryFlow
{
struct GEOMETRYFLOWMESHPROCESSING_API FMeshRepackUVsSettings
{
DECLARE_GEOMETRYFLOW_DATA_TYPE_IDENTIFIER(EMeshProcessingDataTypes::RepackUVsSettings);
int32 UVLayer = 0;
int32 TextureResolution = 512;
int32 GutterSize = 1;
bool bAllowFlips = false;
FVector2f UVScale = FVector2f::One();
FVector2f UVTranslation = FVector2f::Zero();
};
GEOMETRYFLOW_DECLARE_SETTINGS_TYPES(FMeshRepackUVsSettings, MeshRepackUVs);
class GEOMETRYFLOWMESHPROCESSING_API FMeshRepackUVsNode : public TProcessMeshWithSettingsBaseNode<FMeshRepackUVsSettings>
{
public:
FMeshRepackUVsNode() : TProcessMeshWithSettingsBaseNode<FMeshRepackUVsSettings>()
{
// we can mutate input mesh
ConfigureInputFlags(InParamMesh(), FNodeInputFlags::Transformable());
}
virtual void ProcessMesh(
const FNamedDataMap& DatasIn,
const FMeshRepackUVsSettings& Settings,
const FDynamicMesh3& MeshIn,
FDynamicMesh3& MeshOut,
TUniquePtr<FEvaluationInfo>& EvaluationInfo) override
{
MeshOut = MeshIn;
RepackUVsForMesh(MeshOut, Settings);
}
virtual void ProcessMeshInPlace(
const FNamedDataMap& DatasIn,
const FMeshRepackUVsSettings& Settings,
FDynamicMesh3& MeshInOut,
TUniquePtr<FEvaluationInfo>& EvaluationInfo)
{
RepackUVsForMesh(MeshInOut, Settings);
}
void RepackUVsForMesh(FDynamicMesh3& EditMesh, const FMeshRepackUVsSettings& Settings);
};
} // end namespace GeometryFlow
} // end