UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FaceNormalClustering.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "MathUtil.h"
6
7namespace UE::Geometry
8{
9
10class FDynamicMesh3;
11
12namespace FaceNormalClustering
13{
15 {
16 // If one minus the dot product of normals is greater than this value, they are similar enough to be joined together.
18 // The area threshold below which we ignore the computed triangle normal, and always merge to an adjacent group. Helps avoid tiny triangles failing to cluster due to unreliable normals.
19 double SmallFaceAreaThreshold = FMathd::ZeroTolerance;
20 // The minimum number of cluster groups below which to stop merging clusters
22 // Whether to consider the average normal of the whole cluster before merging. If false, will only consider the normals of the original triangles within a group.
24
29 };
30
40
50}
51
52} // end namespace UE::Geometry
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Array.h:670
static RealType Cos(const RealType Value)
Definition MathUtil.h:372
Definition DynamicMesh3.h:108
void ComputeClusterCornerVertices(FDynamicMesh3 &Mesh, TArray< int32 > &OutCornerVertices, const FClusterOptions &Options, TSet< int32 > *IgnoreEdges)
Definition FaceNormalClustering.cpp:168
void ComputeMeshPolyGroupsFromClusters(FDynamicMesh3 &Mesh, TArray< TArray< int32 > > &OutPolyGroups, const FClusterOptions &Options, TSet< int32 > *IgnoreEdges)
Definition FaceNormalClustering.cpp:144
Definition ParametricSurfaceData.h:18
Definition FaceNormalClustering.h:15
bool bApplyNormalToleranceToClusters
Definition FaceNormalClustering.h:23
double NormalOneMinusCosTolerance
Definition FaceNormalClustering.h:17
void SetNormalAngleToleranceInDegrees(double ToleranceInDegrees)
Definition FaceNormalClustering.h:25
int32 TargetMinGroups
Definition FaceNormalClustering.h:21
double SmallFaceAreaThreshold
Definition FaceNormalClustering.h:19