UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshTopologyHelper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#if PLATFORM_DESKTOP
7
8#include "MeshTypes.h"
9#include "MeshDescription.h"
10
11#include <bit>
12
13#define ELEMENT_FIRST_MARKER_MASK 0x02
14
15namespace UE::CADKernel::MeshUtilities
16{
17 struct FElementMetaData
18 {
19 uint16 Category : 4;
20 uint16 Markers : 4;
21 uint16 Extras : 4;
22 };
23
24 enum class EElementType : uint8_t
25 {
26 Unused = 0,
27 Free = 1 << 0,
28 Line = 1 << 1,
29 Surface = 1 << 2,
30 Border = 1 << 3,
31 NonManifold = 1 << 4,
32 NonSurface = 1 << 5,
33 Max = 1 << 7,
34 };
36
38 {
39
40 private:
42
45
48
49 private:
50 static int32 type_width(EElementType Type)
51 {
52 return std::bit_width((unsigned char)Type);
53 }
54
55 public:
58
59 void UpdateMeshWrapper();
60
62 {
64 }
66 {
68 }
69
71 {
72 return EdgeTypeSet[Edge];
73 }
74
75 bool IsEdgeOfType(FEdgeID Edge, EElementType Type) const
76 {
77 return EnumHasAnyFlags(EdgeTypeSet[Edge], Type);
78 }
79
81
82 // Triangle
84
86
87 // Edge
89
95 bool GetEdgeDirectionInTriangle(FEdgeID Edge, int32 TriangleIndex) const;
96 void DefineEdgeTopology(FEdgeID EdgeID);
97
98 // Vertex
101
103 };
104}
105#endif
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
EElementType
Definition DrawElementCoreTypes.h:35
constexpr bool EnumHasAnyFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:35
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
@ Vertex
Definition MetalRHIPrivate.h:223
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition Array.h:670
Category
Definition DiffResults.h:63
Definition MeshTypes.h:150
Definition MeshDescription.h:94
Definition MeshTypes.h:206
Definition MeshTypes.h:90
Definition MeshTypes.h:120