UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DynamicMeshToMeshDescription.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6#include "CoreMinimal.h"
8#include "GeometryBase.h"
10#include "MeshDescription.h"
11
13namespace UE { namespace Geometry { class FDynamicMesh3; } }
14struct FMeshDescription;
15struct FTriangleID;
16struct FVertexID;
17
19
25{
26public:
28 bool bPrintDebugMessages = false;
29
32
33 // Set MaterialID to Polygroup mapping via the reverse mapping
35
39
43
53 static MESHCONVERSION_API bool HaveMatchingElementCounts(const FDynamicMesh3* DynamicMesh, const FMeshDescription* MeshDescription, bool bVerticesOnly, bool bAttributesOnly);
54
62 MESHCONVERSION_API bool HaveMatchingElementCounts(const FDynamicMesh3* DynamicMesh, const FMeshDescription* MeshDescription);
63
74
82
88 MESHCONVERSION_API void Update(const FDynamicMesh3* MeshIn, FMeshDescription& MeshOut, bool bUpdateNormals = true, bool bUpdateTangents = false, bool bUpdateUVs = false);
89
90
100 MESHCONVERSION_API void UpdateAttributes(const FDynamicMesh3* MeshIn, FMeshDescription& MeshOut, bool bUpdateNormals, bool bUpdateTangents, bool bUpdateUVs);
101
110
111
118
119
126
127
128
129 //
130 // Internal functions that you can also call directly
131 //
132
138
147
159
160
161
162protected:
163
170
177
188
189private:
191 TArray<int32> MaterialIDToPolygroupIDMap;
192};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define PREDECLARE_GEOMETRY(TypeName)
Definition GeometryBase.h:14
Definition DynamicMeshToMeshDescription.h:25
MESHCONVERSION_API void UpdateTangents(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, const UE::Geometry::TMeshTangents< double > *SrcTangents)
Definition DynamicMeshToMeshDescription.cpp:322
MESHCONVERSION_API void UpdateUsingConversionOptions(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut)
Definition DynamicMeshToMeshDescription.cpp:517
MESHCONVERSION_API void Convert_SharedInstances(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut)
Definition DynamicMeshToMeshDescription.cpp:622
MESHCONVERSION_API void UpdateVertexColors(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut)
Definition DynamicMeshToMeshDescription.cpp:416
bool bPrintDebugMessages
Definition DynamicMeshToMeshDescription.h:28
static MESHCONVERSION_API bool HaveMatchingElementCounts(const FDynamicMesh3 *DynamicMesh, const FMeshDescription *MeshDescription, bool bVerticesOnly, bool bAttributesOnly)
Definition DynamicMeshToMeshDescription.cpp:494
FConversionToMeshDescriptionOptions ConversionOptions
Definition DynamicMeshToMeshDescription.h:31
MESHCONVERSION_API void Convert(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bCopyTangents=false)
Definition DynamicMeshToMeshDescription.cpp:457
MESHCONVERSION_API void ConvertPolygroupLayers(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, const TArray< FTriangleID > &IndexToTriangleIDMap)
Definition DynamicMeshToMeshDescription.cpp:1236
MESHCONVERSION_API void Convert_NoSharedInstances(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bCopyTangents)
Definition DynamicMeshToMeshDescription.cpp:790
MESHCONVERSION_API void ConvertWeightLayers(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, const TArray< FVertexID > &IndexToVertexIDMap)
Definition DynamicMeshToMeshDescription.cpp:1283
FDynamicMeshToMeshDescription()
Definition DynamicMeshToMeshDescription.h:36
FDynamicMeshToMeshDescription(FConversionToMeshDescriptionOptions ConversionOptions)
Definition DynamicMeshToMeshDescription.h:40
MESHCONVERSION_API void ApplyVertexColorTransform(FVector4f &Color) const
Definition DynamicMeshToMeshDescription.cpp:1330
MESHCONVERSION_API void Convert_NoAttributes(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut)
Definition DynamicMeshToMeshDescription.cpp:544
MESHCONVERSION_API void UpdateAttributes(const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bUpdateNormals, bool bUpdateTangents, bool bUpdateUVs)
Definition DynamicMeshToMeshDescription.cpp:172
void MESHCONVERSION_API SetMaterialIDMapFromInverseMap(TArrayView< const int32 > PolygroupIDToMaterialIDMap)
Definition DynamicMeshToMeshDescription.cpp:471
Definition ArrayView.h:139
Definition Array.h:670
Definition DynamicMesh3.h:108
Definition MeshTangents.h:76
Definition AdvancedWidgetsModule.cpp:13
Definition MeshConversionOptions.h:9
Definition MeshDescription.h:94
Definition MeshTypes.h:206
Definition MeshTypes.h:90