UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DynamicMeshOverlay.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4#pragma once
5
6#include "Containers/Array.h"
8#include "Containers/Set.h"
10#include "GeometryTypes.h"
11#include "IndexTypes.h"
12#include "InfoTypes.h"
13#include "IntVectorTypes.h"
14#include "Math/UnrealMathSSE.h"
15#include "Math/Vector.h"
16#include "Math/Vector2D.h"
17#include "Math/Vector4.h"
19#include "Templates/Function.h"
21#include "Util/CompactMaps.h"
22#include "Util/DynamicVector.h"
23#include "Util/RefCountVector.h"
24#include "Util/SmallListSet.h"
25#include "VectorTypes.h"
26
27class FArchive;
28namespace DynamicMeshInfo { struct FEdgeCollapseInfo; }
29namespace DynamicMeshInfo { struct FEdgeFlipInfo; }
30namespace DynamicMeshInfo { struct FEdgeSplitInfo; }
31namespace DynamicMeshInfo { struct FMergeEdgesInfo; }
32namespace DynamicMeshInfo { struct FPokeTriangleInfo; }
33namespace DynamicMeshInfo { struct FVertexSplitInfo; }
34
35namespace UE
36{
37namespace Geometry
38{
39
40class FDynamicMesh3;
41
66template<typename RealType, int ElementSize>
68{
69
70protected:
73
80
83
84 friend class FDynamicMesh3;
86
87public:
90 {
91 ParentMesh = nullptr;
92 }
93
99private:
101 void Reparent(FDynamicMesh3* ParentMeshIn)
102 {
104 }
105public:
107 const FDynamicMesh3* GetParentMesh() const { return ParentMesh; }
110
113 {
114 ElementsRefCounts = FRefCountVector(Copy.ElementsRefCounts);
115 Elements = Copy.Elements;
116 ParentVertices = Copy.ParentVertices;
117 ElementTriangles = Copy.ElementTriangles;
118 }
119
122 {
124
125 // map of element IDs
127
128 // copy elements across
129 RealType Data[ElementSize];
130 for (int EID = 0; EID < Copy.MaxElementID(); EID++)
131 {
132 if (Copy.IsElement(EID))
133 {
134 Copy.GetElement(EID, Data);
135 MapE[EID] = AppendElement(Data);
136 }
137 else
138 {
139 MapE[EID] = -1;
140 }
141 }
142
143 // copy triangles across
144 check(CompactMaps.NumTriangleMappings() == Copy.GetParentMesh()->MaxTriangleID()); // must have valid triangle map
145 for (int FromTID : Copy.GetParentMesh()->TriangleIndicesItr())
146 {
147 if (!Copy.IsSetTriangle(FromTID))
148 {
149 continue;
150 }
151 const int ToTID = CompactMaps.GetTriangleMapping(FromTID);
152 FIndex3i FromTriElements = Copy.GetTriangle(FromTID);
154 }
155 }
156
159 {
160 int iLastE = MaxElementID() - 1, iCurE = 0;
161 while (iLastE >= 0 && ElementsRefCounts.IsValidUnsafe(iLastE) == false)
162 {
163 iLastE--;
164 }
166 {
167 iCurE++;
168 }
169
170 // make a map to track element index changes, to use to update element triangles later
171 // TODO: it may be faster to not construct this and to do the remapping per element as we go (by iterating the one ring of each parent vertex for each element)
173 for (int ID = 0; ID < MapE.Num(); ID++)
174 {
175 // mapping is 1:1 by default; sparsely re-mapped below
176 MapE[ID] = ID;
177 // remap all parents
178 if (ParentVertices[ID] >= 0)
179 {
180 ParentVertices[ID] = CompactMaps.GetVertexMapping(ParentVertices[ID]);
181 }
182 }
183
185 RealType Data[ElementSize];
186 while (iCurE < iLastE)
187 {
188 // remap the element data
189 GetElement(iLastE, Data);
190 SetElement(iCurE, Data);
192 ERef[iCurE] = ERef[iLastE];
194 MapE[iLastE] = iCurE;
195
196 // move cur forward one, last back one, and then search for next valid
197 iLastE--; iCurE++;
198 while (iLastE >= 0 && ElementsRefCounts.IsValidUnsafe(iLastE) == false)
199 {
200 iLastE--;
201 }
203 {
204 iCurE++;
205 }
206 }
208 Elements.Resize(ElementCount() * ElementSize);
210
211 // Remap and compact triangle element indices.
212 int32 MaxNewTID = -1;
213 for (int TID = 0, OldMaxTID = ElementTriangles.Num() / 3; TID < OldMaxTID; TID++)
214 {
215 const int32 OldStart = TID * 3;
216 const int32 NewTID = CompactMaps.GetTriangleMapping(TID);
218 {
219 // skip if there's no mapping
220 continue;
221 }
222
223 MaxNewTID = FMath::Max(NewTID, MaxNewTID);
224
225 const int32 NewStart = NewTID * 3;
227 {
228 // triangle was not set; copy back InvalidID
229 for (int SubIdx = 0; SubIdx < 3; SubIdx++)
230 {
232 }
233 }
234 else
235 {
236 for (int SubIdx = 0; SubIdx < 3; SubIdx++)
237 {
239 }
240 }
241 }
242 // ElementTriangles should never grow during a compaction, so just resizing is ok
243 // (i.e., we shouldn't need to set InvalidID on any added triangles)
244 checkSlow(ElementTriangles.Num() >= (MaxNewTID + 1) * 3);
246
248 }
249
251 {
252 // We expect to be appending s.t. the intial ElementTriangles map to the pre-append triangles
253 if (!ensure(ElementTriangles.Num() == AppendInfo.TriangleOffset * 3))
254 {
255 ElementTriangles.SetNum(AppendInfo.TriangleOffset * 3);
256 }
257 check(ToAppend.ElementTriangles.Num() == AppendInfo.NumTriangle * 3);
258
261 ElementTriangles.Add(ToAppend.ElementTriangles);
262 for (int32 Idx = ElementTrianglesOffset, N = ElementTriangles.Num(); Idx < N; ++Idx)
263 {
266 {
268 }
269 }
270
271 checkSlow(ElementIDOffset == ParentVertices.Num()); // ParentVertices must be 1:1 with Element IDs
272 ParentVertices.Add(ToAppend.ParentVertices);
273 for (int32 Idx = 0; Idx < ToAppend.ParentVertices.Num(); ++Idx)
274 {
277 {
278 Parent += AppendInfo.VertexOffset;
279 }
280 }
281 ElementsRefCounts.Append(ToAppend.ElementsRefCounts);
282 Elements.Add(ToAppend.Elements);
283 }
285 {
286 // Note: ElementRefCounts, Elements and ParentVertices remain unchanged, since the new triangles are unset
287 checkSlow(ElementTriangles.Num() == AppendInfo.TriangleOffset * 3);
288 ElementTriangles.Resize(3 * (AppendInfo.TriangleOffset + AppendInfo.NumTriangle), IndexConstants::InvalidID);
289 }
290
292 void ClearElements();
293
295 template <typename EnumerableIntType>
296 void ClearElements(const EnumerableIntType& Triangles)
297 {
298 for (int32 TriID : Triangles)
299 {
301 }
302 }
303
305 int ElementCount() const { return (int)ElementsRefCounts.GetCount(); }
307 int MaxElementID() const { return (int)ElementsRefCounts.GetMaxIndex(); }
309 inline bool IsElement(int vID) const { return ElementsRefCounts.IsValid(vID); }
310
312 bool IsCompact() const { return ElementsRefCounts.IsDense(); }
313
314
316
319
320
322 int AppendElement(RealType ConstantValue);
324 int AppendElement(const RealType* Value);
325
326 void SetParentVertex(int ElementIndex, int ParentVertexIndex)
327 {
328 ParentVertices[ElementIndex] = ParentVertexIndex;
329 }
330
332 void InitializeTriangles(int MaxTriangleID);
333
342 EMeshResult SetTriangle(int TriangleID, const FIndex3i& TriElements, bool bAllowElementFreeing = true);
343
351 void FreeUnusedElements(const TSet<int>* ElementsToCheck = nullptr);
352
360 void UnsetTriangle(int TriangleID, bool bAllowElementFreeing = true);
361
363 bool IsSetTriangle(int TID) const
364 {
365 bool bIsSet = ElementTriangles[3 * TID] >= 0;
366 // we require that triangle elements either be all set or all unset
367 checkSlow(ElementTriangles[3 * TID + 1] >= 0 == bIsSet);
368 checkSlow(ElementTriangles[3 * TID + 2] >= 0 == bIsSet);
369 return bIsSet;
370 }
371
372
381
386 void CreatePerVertex(RealType InitElementValue);
387
396
405
414 int SplitElement(int ElementID, const TArrayView<const int>& TrianglesToUpdate);
415
426
434
439 void SplitBowties(bool bParallel = true);
440
441
442 //
443 // Support for inserting element at specific ID. This is a bit tricky
444 // because we likely will need to update the free list in the RefCountVector, which
445 // can be expensive. If you are going to do many inserts (eg inside a loop), wrap in
446 // BeginUnsafe / EndUnsafe calls, and pass bUnsafe = true to the InsertElement() calls,
447 // to the defer free list rebuild until you are done.
448 //
449
452 {
453 // do nothing...
454 }
455
461
467 EMeshResult InsertElement(int ElementID, const RealType* Value, bool bUnsafe = false);
468
469
470 //
471 // Accessors/Queries
472 //
473
474
476 inline void GetElement(int ElementID, RealType* Data) const
477 {
478 int k = ElementID * ElementSize;
479 for (int i = 0; i < ElementSize; ++i)
480 {
481 Data[i] = Elements[k + i];
482 }
483 }
484
486 template<typename AsType>
487 void GetElement(int ElementID, AsType& Data) const
488 {
489 int k = ElementID * ElementSize;
490 for (int i = 0; i < ElementSize; ++i)
491 {
492 Data[i] = Elements[k + i];
493 }
494 }
495
503 template<typename AsType>
504 inline void GetElementAtVertex(int TriangleID, int VertexID, AsType& Data) const
505 {
506 int ElementID = GetElementIDAtVertex(TriangleID, VertexID);
507
509 if (ElementID != IndexConstants::InvalidID)
510 {
511 GetElement(ElementID, Data);
512 }
513 }
514
516 inline int GetParentVertex(int ElementID) const
517 {
518 return ParentVertices[ElementID];
519 }
520
521
523 inline FIndex3i GetTriangle(int TriangleID) const
524 {
525 int i = 3 * TriangleID;
527 }
528
530 inline bool GetTriangleIfValid(int TriangleID, FIndex3i& TriangleOut) const
531 {
532 int i = 3 * TriangleID;
533 int a = ElementTriangles[i];
534 if ( a >= 0 )
535 {
537 checkSlow(TriangleOut.B >= 0 && TriangleOut.C >= 0);
538 return true;
539 }
540 return false;
541 }
542
544 inline void SetElement(int ElementID, const RealType* Data)
545 {
546 int k = ElementID * ElementSize;
547 for (int i = 0; i < ElementSize; ++i)
548 {
549 Elements[k + i] = Data[i];
550 }
551 }
552
554 template<typename AsType>
555 void SetElement(int ElementID, const AsType& Data)
556 {
557 int k = ElementID * ElementSize;
558 for (int i = 0; i < ElementSize; ++i)
559 {
560 Elements[k + i] = Data[i];
561 }
562 }
563
565 inline bool TriangleHasElement(int TriangleID, int ElementID) const
566 {
567 int i = 3 * TriangleID;
568 return (ElementTriangles[i] == ElementID || ElementTriangles[i+1] == ElementID || ElementTriangles[i+2] == ElementID);
569 }
570
571
576 bool IsSeamEdge(int EdgeID, bool* bIsNonIntersectingOut = nullptr) const;
578 bool IsSeamEndEdge(int EdgeID) const;
580 bool IsSeamVertex(int VertexID, bool bBoundaryIsSeam = true) const;
582 bool IsSeamIntersectionVertex(int32 VertexID) const;
583
589 bool IsBowtieInOverlay(int32 VertexID) const;
590
592 bool AreTrianglesConnected(int TriangleID0, int TriangleID1) const;
593
595 void GetVertexElements(int VertexID, TArray<int>& OutElements) const;
597 int CountVertexElements(int VertexID, bool bBruteForce = false) const;
598
600 void GetElementTriangles(int ElementID, TArray<int>& OutTriangles) const;
601
607 int GetElementIDAtVertex(int TriangleID, int VertexID) const;
608
610 bool HasInteriorSeamEdges() const;
611
618 template<typename AsType>
619 void GetTriBaryInterpolate(int32 TriangleID, const AsType* BaryCoords, AsType* DataOut) const
620 {
621 int32 TriIndex = 3 * TriangleID;
622 int32 ElemIndex0 = ElementTriangles[TriIndex] * ElementSize;
623 int32 ElemIndex1 = ElementTriangles[TriIndex+1] * ElementSize;
624 int32 ElemIndex2 = ElementTriangles[TriIndex+2] * ElementSize;
625 const AsType Bary0 = (AsType)BaryCoords[0], Bary1 = (AsType)BaryCoords[1], Bary2 = (AsType)BaryCoords[2];
626 for (int32 i = 0; i < ElementSize; ++i)
627 {
628 DataOut[i] = Bary0*(AsType)Elements[ElemIndex0+i] + Bary1*(AsType)Elements[ElemIndex1+i] + Bary2*(AsType)Elements[ElemIndex2+i];
629 }
630 }
631
635 bool CheckValidity(bool bAllowNonManifoldVertices = true, EValidityCheckFailMode FailMode = EValidityCheckFailMode::Check) const;
636
640 bool IsSameAs(const TDynamicMeshOverlay<RealType, ElementSize>& Other, bool bIgnoreDataLayout) const;
641
650 {
651 Overlay.Serialize(Ar, nullptr, false);
652 return Ar;
653 }
654
662 void Serialize(FArchive& Ar, const FCompactMaps* CompactMaps, bool bUseCompression);
663
668
669public:
671 void InitializeNewTriangle(int TriangleID);
673 void OnRemoveTriangle(int TriangleID);
675 void OnReverseTriOrientation(int TriangleID);
690
691protected:
693 void SetElementFromLerp(int SetElement, int ElementA, int ElementB, double Alpha);
695 void SetElementFromBary(int SetElement, int ElementA, int ElementB, int ElementC, const FVector3d& BaryCoords);
696
698 void InternalSetTriangle(int TriangleID, const FIndex3i& TriElements, bool bUpdateRefCounts, bool bAllowElementFreeing = true);
699
700};
701
702
703
704
705
706
712template<typename RealType, int ElementSize, typename VectorType>
713class TDynamicMeshVectorOverlay : public TDynamicMeshOverlay<RealType, ElementSize>
714{
715public:
717
719 : TDynamicMeshOverlay<RealType, ElementSize>()
720 {
721 }
722
727
731 inline int AppendElement(const VectorType& Value)
732 {
733 // Cannot use cast operator here because Core Vector types do not define it.
734 // However assuming that vector has .X member is also not good...
735 //return BaseType::AppendElement((const RealType*)Value);
737 }
738
742 inline int AppendElement(const RealType* Value)
743 {
745 }
746
750 inline VectorType GetElement(int ElementID) const
751 {
752 VectorType V;
753 BaseType::GetElement(ElementID, V);
754 return V;
755 }
756
760 inline void GetElement(int ElementID, VectorType& V) const
761 {
762 BaseType::GetElement(ElementID, V);
763 }
764
768 inline VectorType GetElementAtVertex(int TriangleID, int VertexID) const
769 {
770 VectorType V;
771 BaseType::GetElementAtVertex(TriangleID, VertexID, V);
772 return V;
773 }
774
778 inline void GetElementAtVertex(int TriangleID, int VertexID, VectorType& V) const
779 {
780 BaseType::GetElementAtVertex(TriangleID, VertexID, V);
781 }
782
787 inline void GetTriElement(int TriangleID, int32 TriVertexIndex, VectorType& Value) const
788 {
791 }
792
796 inline void GetTriElements(int TriangleID, VectorType& A, VectorType& B, VectorType& C) const
797 {
798 int i = 3 * TriangleID;
802 }
803
804
808 inline void SetElement(int ElementID, const VectorType& Value)
809 {
810 BaseType::SetElement(ElementID, Value);
811 }
812
821 int VertexID,
822 TFunctionRef<bool(int TriangleID, int ElementID, const VectorType& Value)> ProcessFunc,
823 bool bFindUniqueElements = true) const;
824};
825
826
827#if PLATFORM_COMPILER_CLANG
828#define UE_EXTERN_TEMPLATE_API GEOMETRYCORE_API
829#else
830#define UE_EXTERN_TEMPLATE_API
831#endif
832
833#if !UE_MERGED_MODULES
845
854#endif
855
856#undef UE_EXTERN_TEMPLATE_API
857
858} // end namespace UE::Geometry
859} // end namespace UE
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
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 UE_EXTERN_TEMPLATE_API
Definition MeshTangents.cpp:679
Definition Archive.h:1208
virtual void Serialize(void *V, int64 Length)
Definition Archive.h:1689
Definition ArrayView.h:139
Definition Array.h:670
void SetNumUninitialized(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2369
Definition AssetRegistryState.h:50
Definition CompactMaps.h:20
Definition DynamicMesh3.h:108
Definition DynamicMeshAttributeSet.h:84
Definition RefCountVector.h:445
Definition RefCountVector.h:25
TDynamicVector< unsigned short > & GetRawRefCountsUnsafe()
Definition RefCountVector.h:236
void RebuildFreeList()
Definition RefCountVector.h:306
size_t GetMaxIndex() const
Definition RefCountVector.h:56
static constexpr unsigned short INVALID_REF_COUNT
Definition RefCountVector.h:27
size_t GetCount() const
Definition RefCountVector.h:51
bool IsDense() const
Definition RefCountVector.h:61
void Trim(int maxIndex)
Definition RefCountVector.h:325
bool IsValidUnsafe(int Index) const
Definition RefCountVector.h:71
SIZE_T GetByteCount() const
Definition RefCountVector.h:538
void Append(const FRefCountVector &Other)
Definition RefCountVector.h:89
bool IsValid(int Index) const
Definition RefCountVector.h:66
IndexEnumerable Indices() const
Definition RefCountVector.h:458
Definition DynamicMeshOverlay.h:68
void ClearElements(const EnumerableIntType &Triangles)
Definition DynamicMeshOverlay.h:296
void OnRemoveTriangle(int TriangleID)
Definition DynamicMeshOverlay.cpp:1140
const FDynamicMesh3 * GetParentMesh() const
Definition DynamicMeshOverlay.h:107
void CreatePerVertex(RealType InitElementValue)
Definition DynamicMeshOverlay.cpp:167
void SetElement(int ElementID, const AsType &Data)
Definition DynamicMeshOverlay.h:555
void OnCollapseEdge(const DynamicMeshInfo::FEdgeCollapseInfo &CollapseInfo)
Definition DynamicMeshOverlay.cpp:1371
void GetElement(int ElementID, AsType &Data) const
Definition DynamicMeshOverlay.h:487
bool TriangleHasElement(int TriangleID, int ElementID) const
Definition DynamicMeshOverlay.h:565
void OnFlipEdge(const DynamicMeshInfo::FEdgeFlipInfo &FlipInfo)
Definition DynamicMeshOverlay.cpp:1276
void GetTriBaryInterpolate(int32 TriangleID, const AsType *BaryCoords, AsType *DataOut) const
Definition DynamicMeshOverlay.h:619
void SplitBowtiesAtVertex(int32 Vid, TArray< int32 > *NewElementIDs=nullptr)
Definition DynamicMeshOverlay.cpp:372
TDynamicVector< int > ParentVertices
Definition DynamicMeshOverlay.h:79
void BeginUnsafeElementsInsert()
Definition DynamicMeshOverlay.h:451
void Copy(const TDynamicMeshOverlay< RealType, ElementSize > &Copy)
Definition DynamicMeshOverlay.h:112
void SetElementFromLerp(int SetElement, int ElementA, int ElementB, double Alpha)
Definition DynamicMeshOverlay.cpp:1689
bool IsSeamEndEdge(int EdgeID) const
Definition DynamicMeshOverlay.cpp:765
void InitializeTriangles(int MaxTriangleID)
Definition DynamicMeshOverlay.cpp:506
void UnsetTriangle(int TriangleID, bool bAllowElementFreeing=true)
Definition DynamicMeshOverlay.cpp:564
void CompactInPlace(const FCompactMaps &CompactMaps)
Definition DynamicMeshOverlay.h:158
TDynamicMeshOverlay(FDynamicMesh3 *ParentMeshIn)
Definition DynamicMeshOverlay.h:95
EMeshResult SetTriangle(int TriangleID, const FIndex3i &TriElements, bool bAllowElementFreeing=true)
Definition DynamicMeshOverlay.cpp:516
void InitializeNewTriangle(int TriangleID)
Definition DynamicMeshOverlay.cpp:654
bool IsElement(int vID) const
Definition DynamicMeshOverlay.h:309
bool MergeElement(int SourceElementID, int TargetElementID)
Definition DynamicMeshOverlay.cpp:248
element_iterator ElementIndicesItr() const
Definition DynamicMeshOverlay.h:318
void SetElement(int ElementID, const RealType *Data)
Definition DynamicMeshOverlay.h:544
bool GetTriangleIfValid(int TriangleID, FIndex3i &TriangleOut) const
Definition DynamicMeshOverlay.h:530
int GetElementIDAtVertex(int TriangleID, int VertexID) const
Definition DynamicMeshOverlay.cpp:1117
bool HasInteriorSeamEdges() const
Definition DynamicMeshOverlay.cpp:818
void GetElement(int ElementID, RealType *Data) const
Definition DynamicMeshOverlay.h:476
void AppendDefaulted(const FDynamicMesh3::FAppendInfo &AppendInfo)
Definition DynamicMeshOverlay.h:284
bool IsCompact() const
Definition DynamicMeshOverlay.h:312
bool CheckValidity(bool bAllowNonManifoldVertices=true, EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check) const
Definition DynamicMeshOverlay.cpp:1765
void GetVertexElements(int VertexID, TArray< int > &OutElements) const
Definition DynamicMeshOverlay.cpp:1031
void CreateFromPredicate(TFunctionRef< bool(int ParentVertexIdx, int TriIDA, int TriIDB)> TrisCanShareVertexPredicate, RealType InitElementValue)
Definition DynamicMeshOverlay.cpp:88
void OnMergeVertices(const DynamicMeshInfo::FMergeVerticesInfo &MergeInfo)
Definition DynamicMeshOverlay.cpp:1632
TDynamicMeshOverlay()
Definition DynamicMeshOverlay.h:89
FRefCountVector ElementsRefCounts
Definition DynamicMeshOverlay.h:75
void OnMergeEdges(const DynamicMeshInfo::FMergeEdgesInfo &MergeInfo)
Definition DynamicMeshOverlay.cpp:1598
int SplitElement(int ElementID, const TArrayView< const int > &TrianglesToUpdate)
Definition DynamicMeshOverlay.cpp:294
void OnSplitVertex(const DynamicMeshInfo::FVertexSplitInfo &SplitInfo, const TArrayView< const int > &TrianglesToUpdate)
Definition DynamicMeshOverlay.cpp:1656
int GetParentVertex(int ElementID) const
Definition DynamicMeshOverlay.h:516
void GetElementAtVertex(int TriangleID, int VertexID, AsType &Data) const
Definition DynamicMeshOverlay.h:504
int AppendElement(RealType ConstantValue)
Definition DynamicMeshOverlay.cpp:24
void SplitVerticesWithPredicate(TFunctionRef< bool(int ElementIdx, int TriID)> ShouldSplitOutVertex, TFunctionRef< void(int ElementIdx, int TriID, RealType *FillVect)> GetNewElementValue)
Definition DynamicMeshOverlay.cpp:206
void EndUnsafeElementsInsert()
Definition DynamicMeshOverlay.h:457
TDynamicVector< RealType > Elements
Definition DynamicMeshOverlay.h:77
FDynamicMesh3 * ParentMesh
Definition DynamicMeshOverlay.h:72
bool IsSameAs(const TDynamicMeshOverlay< RealType, ElementSize > &Other, bool bIgnoreDataLayout) const
Definition DynamicMeshOverlay.cpp:1859
void CompactCopy(const FCompactMaps &CompactMaps, const TDynamicMeshOverlay< RealType, ElementSize > &Copy)
Definition DynamicMeshOverlay.h:121
FIndex3i GetTriangle(int TriangleID) const
Definition DynamicMeshOverlay.h:523
friend FArchive & operator<<(FArchive &Ar, TDynamicMeshOverlay< RealType, ElementSize > &Overlay)
Definition DynamicMeshOverlay.h:649
EMeshResult InsertElement(int ElementID, const RealType *Value, bool bUnsafe=false)
Definition DynamicMeshOverlay.cpp:58
bool IsSetTriangle(int TID) const
Definition DynamicMeshOverlay.h:363
void ClearElements()
Definition DynamicMeshOverlay.cpp:13
void SetParentVertex(int ElementIndex, int ParentVertexIndex)
Definition DynamicMeshOverlay.h:326
void SplitBowties(bool bParallel=true)
Definition DynamicMeshOverlay.cpp:337
FRefCountVector::IndexEnumerable element_iterator
Definition DynamicMeshOverlay.h:315
SIZE_T GetByteCount() const
Definition DynamicMeshOverlay.h:664
int MaxElementID() const
Definition DynamicMeshOverlay.h:307
int ElementCount() const
Definition DynamicMeshOverlay.h:305
bool IsBowtieInOverlay(int32 VertexID) const
Definition DynamicMeshOverlay.cpp:891
void OnPokeTriangle(const DynamicMeshInfo::FPokeTriangleInfo &PokeInfo)
Definition DynamicMeshOverlay.cpp:1568
bool AreTrianglesConnected(int TriangleID0, int TriangleID1) const
Definition DynamicMeshOverlay.cpp:1016
TDynamicVector< int > ElementTriangles
Definition DynamicMeshOverlay.h:82
int SplitElementWithNewParent(int ElementID, int SplitParentVertexID, const TArrayView< const int > &TrianglesToUpdate)
Definition DynamicMeshOverlay.cpp:302
bool IsSeamEdge(int EdgeID, bool *bIsNonIntersectingOut=nullptr) const
Definition DynamicMeshOverlay.cpp:669
void OnReverseTriOrientation(int TriangleID)
Definition DynamicMeshOverlay.cpp:1167
int CountVertexElements(int VertexID, bool bBruteForce=false) const
Definition DynamicMeshOverlay.cpp:1054
void SetElementFromBary(int SetElement, int ElementA, int ElementB, int ElementC, const FVector3d &BaryCoords)
Definition DynamicMeshOverlay.cpp:1703
FDynamicMesh3 * GetParentMesh()
Definition DynamicMeshOverlay.h:109
void GetElementTriangles(int ElementID, TArray< int > &OutTriangles) const
Definition DynamicMeshOverlay.cpp:1098
void InternalSetTriangle(int TriangleID, const FIndex3i &TriElements, bool bUpdateRefCounts, bool bAllowElementFreeing=true)
Definition DynamicMeshOverlay.cpp:586
bool IsSeamIntersectionVertex(int32 VertexID) const
Definition DynamicMeshOverlay.cpp:879
void OnSplitEdge(const DynamicMeshInfo::FEdgeSplitInfo &SplitInfo)
Definition DynamicMeshOverlay.cpp:1180
bool IsSeamVertex(int VertexID, bool bBoundaryIsSeam=true) const
Definition DynamicMeshOverlay.cpp:861
void Append(const TDynamicMeshOverlay &ToAppend, const FDynamicMesh3::FAppendInfo &AppendInfo)
Definition DynamicMeshOverlay.h:250
void FreeUnusedElements(const TSet< int > *ElementsToCheck=nullptr)
Definition DynamicMeshOverlay.cpp:536
Definition DynamicMeshOverlay.h:714
int AppendElement(const RealType *Value)
Definition DynamicMeshOverlay.h:742
void GetElement(int ElementID, VectorType &V) const
Definition DynamicMeshOverlay.h:760
bool EnumerateVertexElements(int VertexID, TFunctionRef< bool(int TriangleID, int ElementID, const VectorType &Value)> ProcessFunc, bool bFindUniqueElements=true) const
Definition DynamicMeshOverlay.cpp:1719
VectorType GetElementAtVertex(int TriangleID, int VertexID) const
Definition DynamicMeshOverlay.h:768
TDynamicMeshVectorOverlay()
Definition DynamicMeshOverlay.h:718
TDynamicMeshVectorOverlay(FDynamicMesh3 *parentMesh)
Definition DynamicMeshOverlay.h:723
void SetElement(int ElementID, const VectorType &Value)
Definition DynamicMeshOverlay.h:808
VectorType GetElement(int ElementID) const
Definition DynamicMeshOverlay.h:750
void GetElementAtVertex(int TriangleID, int VertexID, VectorType &V) const
Definition DynamicMeshOverlay.h:778
void GetTriElements(int TriangleID, VectorType &A, VectorType &B, VectorType &C) const
Definition DynamicMeshOverlay.h:796
void GetTriElement(int TriangleID, int32 TriVertexIndex, VectorType &Value) const
Definition DynamicMeshOverlay.h:787
int AppendElement(const VectorType &Value)
Definition DynamicMeshOverlay.h:731
Definition DynamicVector.h:27
size_t GetByteCount() const
Definition DynamicVector.h:149
void Add(const Type &Data)
Definition DynamicVector.h:662
size_t Num() const
Definition DynamicVector.h:147
void Resize(unsigned int Count)
Definition DynamicVector.h:603
void SetNum(unsigned int Count)
Definition DynamicVector.h:143
Definition DynamicMeshAttributeSet.h:26
constexpr int InvalidID
Definition IndexTypes.h:13
template class GEOMETRYCORE_API TDynamicMeshOverlay< float, 2 >
Definition DynamicMeshOverlay.cpp:2126
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< int, 2, FVector2i >
Definition DynamicMeshOverlay.cpp:2137
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< float, 2, FVector2f >
Definition DynamicMeshOverlay.cpp:2135
template class GEOMETRYCORE_API TDynamicMeshOverlay< double, 1 >
Definition DynamicMeshOverlay.cpp:2124
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< double, 4, FVector4d >
Definition DynamicMeshOverlay.cpp:2142
EMeshResult
Definition GeometryTypes.h:18
template class GEOMETRYCORE_API TDynamicMeshOverlay< double, 4 >
Definition DynamicMeshOverlay.cpp:2133
template class GEOMETRYCORE_API TDynamicMeshOverlay< double, 3 >
Definition DynamicMeshOverlay.cpp:2130
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< double, 2, FVector2d >
Definition DynamicMeshOverlay.cpp:2136
template class GEOMETRYCORE_API TDynamicMeshOverlay< float, 4 >
Definition DynamicMeshOverlay.cpp:2132
template class GEOMETRYCORE_API TDynamicMeshOverlay< float, 1 >
Definition DynamicMeshOverlay.cpp:2123
EValidityCheckFailMode
Definition GeometryTypes.h:72
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< float, 4, FVector4f >
Definition DynamicMeshOverlay.cpp:2141
template class GEOMETRYCORE_API TDynamicMeshOverlay< double, 2 >
Definition DynamicMeshOverlay.cpp:2127
template class GEOMETRYCORE_API TDynamicMeshOverlay< int, 1 >
Definition DynamicMeshOverlay.cpp:2125
template class GEOMETRYCORE_API TDynamicMeshOverlay< int, 3 >
Definition DynamicMeshOverlay.cpp:2131
template class GEOMETRYCORE_API TDynamicMeshOverlay< int, 2 >
Definition DynamicMeshOverlay.cpp:2128
template class GEOMETRYCORE_API TDynamicMeshOverlay< float, 3 >
Definition DynamicMeshOverlay.cpp:2129
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< double, 3, FVector3d >
Definition DynamicMeshOverlay.cpp:2139
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< float, 3, FVector3f >
Definition DynamicMeshOverlay.cpp:2138
template class GEOMETRYCORE_API TDynamicMeshVectorOverlay< int, 3, FVector3i >
Definition DynamicMeshOverlay.cpp:2140
Definition AdvancedWidgetsModule.cpp:13
Definition InfoTypes.h:181
Definition InfoTypes.h:171
Definition InfoTypes.h:155
Definition InfoTypes.h:197
Definition InfoTypes.h:216
Definition InfoTypes.h:229
Definition InfoTypes.h:242
Definition DynamicMesh3.h:309
Definition IndexTypes.h:158