UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreMinimal.h"
7#include "CoreTypes.h"
8#include "Logging/LogMacros.h"
10#include "Templates/TypeHash.h"
12
13#include "MeshTypes.generated.h"
14
16
17
18// @todo mesheditor: Need comments
19
20USTRUCT( BlueprintType )
21struct FElementID // @todo mesheditor script: BP doesn't have name spaces, so we might need a more specific display name, or just rename our various types
22{
24
26 : IDValue(INDEX_NONE)
27 {
28 }
29
31 : IDValue( InitIDValue )
32 {
33 }
34
35 inline int32 GetValue() const
36 {
37 return IDValue;
38 }
39
40 inline operator int32() const
41 {
42 return IDValue;
43 }
44
45 inline bool operator==( const FElementID& Other ) const
46 {
47 return IDValue == Other.IDValue;
48 }
49
50 inline bool operator==( const int32 Other ) const
51 {
52 return IDValue == Other;
53 }
54
55 inline bool operator!=( const FElementID& Other ) const
56 {
57 return IDValue != Other.IDValue;
58 }
59
60 inline bool operator!=( const int32 Other ) const
61 {
62 return IDValue != Other;
63 }
64
65 FString ToString() const
66 {
67 return ( IDValue == INDEX_NONE ) ? TEXT( "Invalid" ) : FString::Printf( TEXT( "%d" ), IDValue );
68 }
69
70 friend FArchive& operator<<( FArchive& Ar, FElementID& Element )
71 {
72 Ar << Element.IDValue;
73 return Ar;
74 }
75
77 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
79
81
83 UPROPERTY( BlueprintReadOnly, Category="Editable Mesh" )
84 int32 IDValue;
85};
86
87
88USTRUCT( BlueprintType )
90{
92
94 {
95 }
96
98 : FElementID( InitElementID.GetValue() )
99 {
100 }
101
104 {
105 }
106
107 inline friend uint32 GetTypeHash( const FVertexID& Other )
108 {
109 return GetTypeHash( Other.IDValue );
110 }
111
113 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
115};
116
117
118USTRUCT( BlueprintType )
120{
122
124 {
125 }
126
128 : FElementID( InitElementID.GetValue() )
129 {
130 }
131
136
138 {
139 return GetTypeHash( Other.IDValue );
140 }
141
143 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
145};
146
147
148USTRUCT( BlueprintType )
150{
152
154 {
155 }
156
158 : FElementID( InitElementID.GetValue() )
159 {
160 }
161
164 {
165 }
166
167 inline friend uint32 GetTypeHash( const FEdgeID& Other )
168 {
169 return GetTypeHash( Other.IDValue );
170 }
171
173 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
175};
176
177
178USTRUCT( BlueprintType )
180{
182
184 {
185 }
186
188 : FElementID( InitElementID.GetValue() )
189 {
190 }
191
194 {
195 }
196
197 inline friend uint32 GetTypeHash( const FUVID& Other )
198 {
199 return GetTypeHash( Other.IDValue );
200 }
201};
202
203
204USTRUCT(BlueprintType)
206{
208
210 {
211 }
212
214 : FElementID(InitElementID.GetValue())
215 {
216 }
217
220 {
221 }
222
223 inline friend uint32 GetTypeHash(const FTriangleID& Other)
224 {
225 return GetTypeHash(Other.IDValue);
226 }
227
229 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
231};
232
233
234USTRUCT( BlueprintType )
236{
238
240 {
241 }
242
244 : FElementID( InitElementID.GetValue() )
245 {
246 }
247
252
253 inline friend uint32 GetTypeHash( const FPolygonGroupID& Other )
254 {
255 return GetTypeHash( Other.IDValue );
256 }
257
259 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
261};
262
263
264USTRUCT( BlueprintType )
266{
268
270 {
271 }
272
274 : FElementID( InitElementID.GetValue() )
275 {
276 }
277
280 {
281 }
282
283 inline friend uint32 GetTypeHash( const FPolygonID& Other )
284 {
285 return GetTypeHash( Other.IDValue );
286 }
287
289 UE_DEPRECATED(4.26, "Please use INDEX_NONE as an invalid ID.")
290 MESHDESCRIPTION_API static const FPolygonID Invalid; // @todo mesheditor script: Can we expose these to BP nicely? Do we even need to?
291};
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
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
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition MeshTypes.h:150
FEdgeID(const int32 InitIDValue)
Definition MeshTypes.h:162
friend uint32 GetTypeHash(const FEdgeID &Other)
Definition MeshTypes.h:167
FEdgeID(const FElementID InitElementID)
Definition MeshTypes.h:157
Definition MeshTypes.h:22
int32 GetValue() const
Definition MeshTypes.h:35
friend FArchive & operator<<(FArchive &Ar, FElementID &Element)
Definition MeshTypes.h:70
bool operator!=(const int32 Other) const
Definition MeshTypes.h:60
FString ToString() const
Definition MeshTypes.h:65
bool operator==(const int32 Other) const
Definition MeshTypes.h:50
FElementID(const int32 InitIDValue)
Definition MeshTypes.h:30
bool operator==(const FElementID &Other) const
Definition MeshTypes.h:45
bool operator!=(const FElementID &Other) const
Definition MeshTypes.h:55
Definition MeshTypes.h:236
friend uint32 GetTypeHash(const FPolygonGroupID &Other)
Definition MeshTypes.h:253
FPolygonGroupID(const FElementID InitElementID)
Definition MeshTypes.h:243
FPolygonGroupID(const int32 InitIDValue)
Definition MeshTypes.h:248
Definition MeshTypes.h:266
FPolygonID(const int32 InitIDValue)
Definition MeshTypes.h:278
friend uint32 GetTypeHash(const FPolygonID &Other)
Definition MeshTypes.h:283
FPolygonID(const FElementID InitElementID)
Definition MeshTypes.h:273
Definition MeshTypes.h:206
FTriangleID(const FElementID InitElementID)
Definition MeshTypes.h:213
FTriangleID(const int32 InitIDValue)
Definition MeshTypes.h:218
friend uint32 GetTypeHash(const FTriangleID &Other)
Definition MeshTypes.h:223
Definition MeshTypes.h:180
FUVID(const FElementID InitElementID)
Definition MeshTypes.h:187
FUVID(const int32 InitIDValue)
Definition MeshTypes.h:192
friend uint32 GetTypeHash(const FUVID &Other)
Definition MeshTypes.h:197
Definition MeshTypes.h:90
FVertexID(const int32 InitIDValue)
Definition MeshTypes.h:102
friend uint32 GetTypeHash(const FVertexID &Other)
Definition MeshTypes.h:107
FVertexID(const FElementID InitElementID)
Definition MeshTypes.h:97
Definition MeshTypes.h:120
FVertexInstanceID(const FElementID InitElementID)
Definition MeshTypes.h:127
FVertexInstanceID(const int32 InitIDValue)
Definition MeshTypes.h:132
friend uint32 GetTypeHash(const FVertexInstanceID &Other)
Definition MeshTypes.h:137