UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshSelfUnion.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4#pragma once
5
6#include "MathUtil.h"
7#include "VectorTypes.h"
8#include "GeometryTypes.h"
9
10#include "DynamicMeshEditor.h"
11
12#include "Spatial/FastWinding.h"
14
15#include "Util/ProgressCancel.h"
16
17#include "Operations/MeshBoolean.h" // for shared utility functions
18
19
20namespace UE
21{
22namespace Geometry
23{
24
29{
30public:
31
32 //
33 // Inputs
34 //
35
40
42 double SnapTolerance = FMathf::ZeroTolerance * 1.0;
43
45 double NormalOffset = FMathf::ZeroTolerance * 1.0;
46
48 double WindingThreshold = .5;
49
51 bool bTrimFlaps = false;
52
54 bool bWeldSharedEdges = true;
55
57 bool bTrackAllNewEdges = false;
58
61
64 //
65 // Simplification-specific settings (only relevant if bSimplifyAlongNewEdges==true):
66 //
78 bool bPreserveVertexUVs = true;
82 float UVDistortTolerance = FMathf::ZeroTolerance;
87
88
89 //
90 // Input & Output (to be modified by algorithm)
91 //
92
93 // The input mesh, to be modified
95
96 //
97 // Output
98 //
99
102
105
106public:
107
109 : Mesh(MeshIn)
110 {
111 check(MeshIn != nullptr);
112 }
113
115 {}
116
121 {
122 // @todo validate inputs
124 }
125
132
133protected:
135 virtual bool Cancelled()
136 {
137 return (Progress == nullptr) ? false : Progress->Cancelled();
138 }
139
140private:
141
142 GEOMETRYCORE_API int FindNearestEdge(const TArray<int>& EIDs, const TArray<int>& BoundaryNbrEdges, FVector3d Pos);
143
145
147
148};
149
150
151} // end namespace UE::Geometry
152} // end namespace UE
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ProgressCancel.h:187
bool Cancelled()
Definition ProgressCancel.h:243
Definition Array.h:670
Definition UnrealString.h.inl:34
Definition DynamicMesh3.h:108
Definition MeshSelfUnion.h:29
FProgressCancel * Progress
Definition MeshSelfUnion.h:60
double NormalOffset
Definition MeshSelfUnion.h:45
double DegenerateEdgeTolFactor
Definition MeshSelfUnion.h:39
bool bTrackAllNewEdges
Definition MeshSelfUnion.h:57
double TryToImproveTriQualityThreshold
Definition MeshSelfUnion.h:74
bool bWeldSharedEdges
Definition MeshSelfUnion.h:54
float UVDistortTolerance
Definition MeshSelfUnion.h:82
bool bCollapseDegenerateEdgesOnCut
Definition MeshSelfUnion.h:37
virtual ~FMeshSelfUnion()
Definition MeshSelfUnion.h:114
GEOMETRYCORE_API bool Compute()
Definition MeshSelfUnion.cpp:23
double WindingThreshold
Definition MeshSelfUnion.h:48
bool bPreserveVertexUVs
Definition MeshSelfUnion.h:78
bool bSimplifyAlongNewEdges
Definition MeshSelfUnion.h:63
EOperationValidationResult Validate()
Definition MeshSelfUnion.h:120
bool bPreserveTriangleGroups
Definition MeshSelfUnion.h:76
FDynamicMesh3 * Mesh
Definition MeshSelfUnion.h:94
double SimplificationAngleTolerance
Definition MeshSelfUnion.h:68
double SnapTolerance
Definition MeshSelfUnion.h:42
TArray< int > CreatedBoundaryEdges
Definition MeshSelfUnion.h:101
FMeshSelfUnion(FDynamicMesh3 *MeshIn)
Definition MeshSelfUnion.h:108
float NormalDistortTolerance
Definition MeshSelfUnion.h:86
bool bPreserveVertexNormals
Definition MeshSelfUnion.h:84
virtual bool Cancelled()
Definition MeshSelfUnion.h:135
bool bPreserveOverlayUVs
Definition MeshSelfUnion.h:80
bool bTrimFlaps
Definition MeshSelfUnion.h:51
TSet< int32 > AllNewEdges
Definition MeshSelfUnion.h:104
EOperationValidationResult
Definition GeometryTypes.h:59
Definition AdvancedWidgetsModule.cpp:13
@ false
Definition radaudio_common.h:23