UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType > Class Template Reference

#include <DynamicMeshOverlay.h>

+ Inheritance diagram for UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >:

Public Types

using BaseType = TDynamicMeshOverlay< RealType, ElementSize >
 
- Public Types inherited from UE::Geometry::TDynamicMeshOverlay< RealType, ElementSize >
typedef FRefCountVector::IndexEnumerable element_iterator
 

Public Member Functions

 TDynamicMeshVectorOverlay ()
 
 TDynamicMeshVectorOverlay (FDynamicMesh3 *parentMesh)
 
int AppendElement (const VectorType &Value)
 
int AppendElement (const RealType *Value)
 
VectorType GetElement (int ElementID) const
 
void GetElement (int ElementID, VectorType &V) const
 
VectorType GetElementAtVertex (int TriangleID, int VertexID) const
 
void GetElementAtVertex (int TriangleID, int VertexID, VectorType &V) const
 
void GetTriElement (int TriangleID, int32 TriVertexIndex, VectorType &Value) const
 
void GetTriElements (int TriangleID, VectorType &A, VectorType &B, VectorType &C) const
 
void SetElement (int ElementID, const VectorType &Value)
 
bool EnumerateVertexElements (int VertexID, TFunctionRef< bool(int TriangleID, int ElementID, const VectorType &Value)> ProcessFunc, bool bFindUniqueElements=true) const
 
- Public Member Functions inherited from UE::Geometry::TDynamicMeshOverlay< RealType, ElementSize >
 TDynamicMeshOverlay ()
 
 TDynamicMeshOverlay (FDynamicMesh3 *ParentMeshIn)
 
const FDynamicMesh3GetParentMesh () const
 
FDynamicMesh3GetParentMesh ()
 
void Copy (const TDynamicMeshOverlay< RealType, ElementSize > &Copy)
 
void CompactCopy (const FCompactMaps &CompactMaps, const TDynamicMeshOverlay< RealType, ElementSize > &Copy)
 
void CompactInPlace (const FCompactMaps &CompactMaps)
 
void Append (const TDynamicMeshOverlay &ToAppend, const FDynamicMesh3::FAppendInfo &AppendInfo)
 
void AppendDefaulted (const FDynamicMesh3::FAppendInfo &AppendInfo)
 
void ClearElements ()
 
template<typename EnumerableIntType >
void ClearElements (const EnumerableIntType &Triangles)
 
int ElementCount () const
 
int MaxElementID () const
 
bool IsElement (int vID) const
 
bool IsCompact () const
 
element_iterator ElementIndicesItr () const
 
int AppendElement (RealType ConstantValue)
 
int AppendElement (const RealType *Value)
 
void SetParentVertex (int ElementIndex, int ParentVertexIndex)
 
void InitializeTriangles (int MaxTriangleID)
 
EMeshResult SetTriangle (int TriangleID, const FIndex3i &TriElements, bool bAllowElementFreeing=true)
 
void FreeUnusedElements (const TSet< int > *ElementsToCheck=nullptr)
 
void UnsetTriangle (int TriangleID, bool bAllowElementFreeing=true)
 
bool IsSetTriangle (int TID) const
 
void CreateFromPredicate (TFunctionRef< bool(int ParentVertexIdx, int TriIDA, int TriIDB)> TrisCanShareVertexPredicate, RealType InitElementValue)
 
void CreatePerVertex (RealType InitElementValue)
 
void SplitVerticesWithPredicate (TFunctionRef< bool(int ElementIdx, int TriID)> ShouldSplitOutVertex, TFunctionRef< void(int ElementIdx, int TriID, RealType *FillVect)> GetNewElementValue)
 
bool MergeElement (int SourceElementID, int TargetElementID)
 
int SplitElement (int ElementID, const TArrayView< const int > &TrianglesToUpdate)
 
int SplitElementWithNewParent (int ElementID, int SplitParentVertexID, const TArrayView< const int > &TrianglesToUpdate)
 
void SplitBowtiesAtVertex (int32 Vid, TArray< int32 > *NewElementIDs=nullptr)
 
void SplitBowties (bool bParallel=true)
 
void BeginUnsafeElementsInsert ()
 
void EndUnsafeElementsInsert ()
 
EMeshResult InsertElement (int ElementID, const RealType *Value, bool bUnsafe=false)
 
void GetElement (int ElementID, RealType *Data) const
 
template<typename AsType >
void GetElement (int ElementID, AsType &Data) const
 
template<typename AsType >
void GetElementAtVertex (int TriangleID, int VertexID, AsType &Data) const
 
int GetParentVertex (int ElementID) const
 
FIndex3i GetTriangle (int TriangleID) const
 
bool GetTriangleIfValid (int TriangleID, FIndex3i &TriangleOut) const
 
void SetElement (int ElementID, const RealType *Data)
 
template<typename AsType >
void SetElement (int ElementID, const AsType &Data)
 
bool TriangleHasElement (int TriangleID, int ElementID) const
 
bool IsSeamEdge (int EdgeID, bool *bIsNonIntersectingOut=nullptr) const
 
bool IsSeamEndEdge (int EdgeID) const
 
bool IsSeamVertex (int VertexID, bool bBoundaryIsSeam=true) const
 
bool IsSeamIntersectionVertex (int32 VertexID) const
 
bool IsBowtieInOverlay (int32 VertexID) const
 
bool AreTrianglesConnected (int TriangleID0, int TriangleID1) const
 
void GetVertexElements (int VertexID, TArray< int > &OutElements) const
 
int CountVertexElements (int VertexID, bool bBruteForce=false) const
 
void GetElementTriangles (int ElementID, TArray< int > &OutTriangles) const
 
int GetElementIDAtVertex (int TriangleID, int VertexID) const
 
bool HasInteriorSeamEdges () const
 
template<typename AsType >
void GetTriBaryInterpolate (int32 TriangleID, const AsType *BaryCoords, AsType *DataOut) const
 
bool CheckValidity (bool bAllowNonManifoldVertices=true, EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check) const
 
bool IsSameAs (const TDynamicMeshOverlay< RealType, ElementSize > &Other, bool bIgnoreDataLayout) const
 
void Serialize (FArchive &Ar, const FCompactMaps *CompactMaps, bool bUseCompression)
 
SIZE_T GetByteCount () const
 
void InitializeNewTriangle (int TriangleID)
 
void OnRemoveTriangle (int TriangleID)
 
void OnReverseTriOrientation (int TriangleID)
 
void OnSplitEdge (const DynamicMeshInfo::FEdgeSplitInfo &SplitInfo)
 
void OnFlipEdge (const DynamicMeshInfo::FEdgeFlipInfo &FlipInfo)
 
void OnCollapseEdge (const DynamicMeshInfo::FEdgeCollapseInfo &CollapseInfo)
 
void OnPokeTriangle (const DynamicMeshInfo::FPokeTriangleInfo &PokeInfo)
 
void OnMergeEdges (const DynamicMeshInfo::FMergeEdgesInfo &MergeInfo)
 
void OnMergeVertices (const DynamicMeshInfo::FMergeVerticesInfo &MergeInfo)
 
void OnSplitVertex (const DynamicMeshInfo::FVertexSplitInfo &SplitInfo, const TArrayView< const int > &TrianglesToUpdate)
 

Additional Inherited Members

- Protected Member Functions inherited from UE::Geometry::TDynamicMeshOverlay< RealType, ElementSize >
void SetElementFromLerp (int SetElement, int ElementA, int ElementB, double Alpha)
 
void SetElementFromBary (int SetElement, int ElementA, int ElementB, int ElementC, const FVector3d &BaryCoords)
 
void InternalSetTriangle (int TriangleID, const FIndex3i &TriElements, bool bUpdateRefCounts, bool bAllowElementFreeing=true)
 
- Protected Attributes inherited from UE::Geometry::TDynamicMeshOverlay< RealType, ElementSize >
FDynamicMesh3ParentMesh
 
FRefCountVector ElementsRefCounts
 
TDynamicVector< RealType > Elements
 
TDynamicVector< int > ParentVertices
 
TDynamicVector< int > ElementTriangles
 

Detailed Description

template<typename RealType, int ElementSize, typename VectorType>
class UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >

TDynamicMeshVectorOverlay is an convenient extension of TDynamicMeshOverlay that adds a specific N-element Vector type to the template, and adds accessor functions that convert between that N-element vector type and the N-element arrays used by TDynamicMeshOverlay.

Member Typedef Documentation

◆ BaseType

template<typename RealType , int ElementSize, typename VectorType >
using UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::BaseType = TDynamicMeshOverlay<RealType, ElementSize>

Constructor & Destructor Documentation

◆ TDynamicMeshVectorOverlay() [1/2]

template<typename RealType , int ElementSize, typename VectorType >
UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::TDynamicMeshVectorOverlay ( )
inline

◆ TDynamicMeshVectorOverlay() [2/2]

template<typename RealType , int ElementSize, typename VectorType >
UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::TDynamicMeshVectorOverlay ( FDynamicMesh3 parentMesh)
inline

Member Function Documentation

◆ AppendElement() [1/2]

template<typename RealType , int ElementSize, typename VectorType >
int UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::AppendElement ( const RealType *  Value)
inline

Append a new Element to the overlay

◆ AppendElement() [2/2]

template<typename RealType , int ElementSize, typename VectorType >
int UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::AppendElement ( const VectorType &  Value)
inline

Append a new Element to the overlay

◆ EnumerateVertexElements()

template<typename RealType , int ElementSize, typename VectorType >
bool TDynamicMeshVectorOverlay::EnumerateVertexElements ( int  VertexID,
TFunctionRef< bool(int TriangleID, int ElementID, const VectorType &Value)>  ProcessFunc,
bool  bFindUniqueElements = true 
) const

Iterate through triangles connected to VertexID and call ProcessFunc for each per-triangle-vertex Element with its Value. ProcessFunc must return true to continue the enumeration, or false to early-terminate it

Parameters
bFindUniqueElementsif true, ProcessFunc is only called once for each ElementID, otherwise it is called once for each Triangle
Returns
true if at least one valid Element was found, ie if ProcessFunc was called at least one time

◆ GetElement() [1/2]

template<typename RealType , int ElementSize, typename VectorType >
VectorType UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetElement ( int  ElementID) const
inline

Get Element at a specific ID

◆ GetElement() [2/2]

template<typename RealType , int ElementSize, typename VectorType >
void UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetElement ( int  ElementID,
VectorType &  V 
) const
inline

Get Element at a specific ID

◆ GetElementAtVertex() [1/2]

template<typename RealType , int ElementSize, typename VectorType >
VectorType UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetElementAtVertex ( int  TriangleID,
int  VertexID 
) const
inline

Get the Element value associated with a vertex of a triangle.

◆ GetElementAtVertex() [2/2]

template<typename RealType , int ElementSize, typename VectorType >
void UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetElementAtVertex ( int  TriangleID,
int  VertexID,
VectorType &  V 
) const
inline

Get the Element value associated with a vertex of a triangle.

◆ GetTriElement()

template<typename RealType , int ElementSize, typename VectorType >
void UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetTriElement ( int  TriangleID,
int32  TriVertexIndex,
VectorType &  Value 
) const
inline

Get the Element associated with a vertex of a triangle

Parameters
TriVertexIndexindex of vertex in triangle, valid values are 0,1,2

◆ GetTriElements()

template<typename RealType , int ElementSize, typename VectorType >
void UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::GetTriElements ( int  TriangleID,
VectorType &  A,
VectorType &  B,
VectorType &  C 
) const
inline

Get the three Elements associated with a triangle

◆ SetElement()

template<typename RealType , int ElementSize, typename VectorType >
void UE::Geometry::TDynamicMeshVectorOverlay< RealType, ElementSize, VectorType >::SetElement ( int  ElementID,
const VectorType &  Value 
)
inline

Set Element at a specific ID


The documentation for this class was generated from the following files: