UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PolygonEdgeMeshGenerator.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 "FrameTypes.h"
7#include "Math/MathFwd.h"
8#include "Math/Vector.h"
10
11namespace UE
12{
13namespace Geometry
14{
15
18{
19
20private:
21
22 // Polygon to thicken and triangulate. Assumed to be closed (i.e. last edge is (LastVertex, FirstVertex)). If Polygon has
23 // self-intersections or degenerate edges, result is undefined.
24 TArray<FFrame3d> Polygon;
25
26 // True if Polygon represents a closed path
27 bool bClosed;
28
29 // For each polygon vertex, a scale factor for the patch width at that vertex. It's a variable offset in order to keep the overall
30 // width constant going around acute corners.
31 TArray<double> OffsetScaleFactors;
32
33 // Width of quads to generate.
34 double Width = 1.0;
35
36 // Normal vector of all vertices will be set to this value. Default is +Z axis.
37 FVector3d Normal = FVector3d::UnitZ();
38
39public:
40
41 double UVWidth = 1.0;
42 double UVHeight = 1.0;
44
46 bool bSinglePolyGroup = false;
47
49 bool bRoundedCorners = false;
50
52 double CornerRadius = 0.0;
53
55 bool bLimitCornerRadius = false;
56
59
61 bool bInClosed,
63 double InWidth = 1.0,
65 bool bInRoundedCorners = false,
66 double InCornerRadius = 0.0,
67 bool bInLimitCornerRadius = false,
68 int InNumArcVertices = 3);
69
71
72 // Generate triangulation
73 // TODO: Enable more subdivisions along the width and length dimensions if requested
75
77
78 void CurvePath(const TArray<FVector3d>& InPath,
79 const TArray<bool>& InteriorAngleFlag,
80 const TArray<double>& MaxCornerRadii,
81 const TArray<double>& OtherSideMaxCornerRadii,
83 TArray<FVector3d>& OutPath) const;
84
85};
86
87
88} // end namespace UE::Geometry
89} // end namespace UE
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Array.h:670
Definition MeshShapeGenerator.h:19
Definition PolygonEdgeMeshGenerator.h:18
virtual GEOMETRYCORE_API FMeshShapeGenerator & Generate() final
Definition PolygonEdgeMeshGenerator.cpp:303
GEOMETRYCORE_API ~FPolygonEdgeMeshGenerator()
double UVWidth
Definition PolygonEdgeMeshGenerator.h:41
double CornerRadius
Definition PolygonEdgeMeshGenerator.h:52
bool bScaleUVByAspectRatio
Definition PolygonEdgeMeshGenerator.h:43
bool bRoundedCorners
Definition PolygonEdgeMeshGenerator.h:49
bool bLimitCornerRadius
Definition PolygonEdgeMeshGenerator.h:55
double UVHeight
Definition PolygonEdgeMeshGenerator.h:42
int NumArcVertices
Definition PolygonEdgeMeshGenerator.h:58
bool bSinglePolyGroup
Definition PolygonEdgeMeshGenerator.h:46
Definition AdvancedWidgetsModule.cpp:13
static TVector< double > UnitZ()
Definition Vector.h:124