UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FDynamicMeshChange Class Reference

#include <DynamicMeshChangeTracker.h>

Classes

struct  FChangeTriangle
 
struct  FChangeVertex
 

Public Member Functions

GEOMETRYCORE_API ~FDynamicMeshChange ()
 
GEOMETRYCORE_API void SaveInitialVertex (const FDynamicMesh3 *Mesh, int VertexID)
 
GEOMETRYCORE_API void SaveInitialTriangle (const FDynamicMesh3 *Mesh, int TriangleID)
 
GEOMETRYCORE_API void StoreFinalVertex (const FDynamicMesh3 *Mesh, int VertexID)
 
GEOMETRYCORE_API void StoreFinalTriangle (const FDynamicMesh3 *Mesh, int TriangleID)
 
void AttachAttributeChanges (TUniquePtr< FDynamicMeshAttributeChangeSet > AttribChanges)
 
GEOMETRYCORE_API bool Apply (FDynamicMesh3 *Mesh, bool bRevert) const
 
GEOMETRYCORE_API void VerifySaveState () const
 
GEOMETRYCORE_API bool HasSavedVertex (int VertexID)
 
GEOMETRYCORE_API void GetSavedTriangleList (TArray< int > &TrianglesOut, bool bInitial) const
 
GEOMETRYCORE_API void GetAffectedVertices (TArray< int > &VerticesOut, bool bRevert) const
 
GEOMETRYCORE_API void CheckValidity (EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check) const
 

Protected Member Functions

GEOMETRYCORE_API void ApplyReplaceChange (FDynamicMesh3 *Mesh, const TArray< FChangeTriangle > &RemoveTris, const TArray< FChangeVertex > &InsertVerts, const TArray< FChangeTriangle > &InsertTris) const
 

Protected Attributes

TArray< FChangeVertexOldVertices
 
TArray< FChangeTriangleOldTriangles
 
TArray< FChangeVertexNewVertices
 
TArray< FChangeTriangleNewTriangles
 
TUniquePtr< FDynamicMeshAttributeChangeSetAttributeChanges
 

Detailed Description

FDynamicMeshChange stores a "change" in a FDynamicMesh3, which in this context means the replacement of one set of triangles with a second set, that may have different vertices/attributes. The change can be applied and reverted via Apply()

Construction of a well-formed FDynamicMeshChange is quite complex and it is strongly suggested that you do so via FDynamicMeshChangeTracker

Constructor & Destructor Documentation

◆ ~FDynamicMeshChange()

FDynamicMeshChange::~FDynamicMeshChange ( )

Member Function Documentation

◆ Apply()

bool FDynamicMeshChange::Apply ( FDynamicMesh3 Mesh,
bool  bRevert 
) const

Apply or Revert this change using the given Mesh

◆ ApplyReplaceChange()

void FDynamicMeshChange::ApplyReplaceChange ( FDynamicMesh3 Mesh,
const TArray< FChangeTriangle > &  RemoveTris,
const TArray< FChangeVertex > &  InsertVerts,
const TArray< FChangeTriangle > &  InsertTris 
) const
protected

◆ AttachAttributeChanges()

void UE::Geometry::FDynamicMeshChange::AttachAttributeChanges ( TUniquePtr< FDynamicMeshAttributeChangeSet AttribChanges)
inline

Attach an attribute change set to this mesh change, which will the be applied/reverted automatically

◆ CheckValidity()

void FDynamicMeshChange::CheckValidity ( EValidityCheckFailMode  FailMode = EValidityCheckFailMode::Check) const

run self-validity checks on internal data structures to test if change is well-formed

◆ GetAffectedVertices()

void FDynamicMeshChange::GetAffectedVertices ( TArray< int > &  VerticesOut,
bool  bRevert 
) const

store IDs of affected vertices in VerticesOut – both vertices on saved triangles, and directly saved vertices. if bRevert=true, returns old vertex IDs, otherwise new IDs are returned.

◆ GetSavedTriangleList()

void FDynamicMeshChange::GetSavedTriangleList ( TArray< int > &  TrianglesOut,
bool  bInitial 
) const

store IDs of saved triangles in TrianglesOut. if bInitial=true, old triangles are stored, otherwise new triangles

◆ HasSavedVertex()

bool FDynamicMeshChange::HasSavedVertex ( int  VertexID)
Returns
true if this vertex was saved. Uses linear search.

◆ SaveInitialTriangle()

void FDynamicMeshChange::SaveInitialTriangle ( const FDynamicMesh3 Mesh,
int  TriangleID 
)

Store the initial state of a triangle

◆ SaveInitialVertex()

void FDynamicMeshChange::SaveInitialVertex ( const FDynamicMesh3 Mesh,
int  VertexID 
)

Store the initial state of a vertex

◆ StoreFinalTriangle()

void FDynamicMeshChange::StoreFinalTriangle ( const FDynamicMesh3 Mesh,
int  TriangleID 
)

Store the final state of a triangle

◆ StoreFinalVertex()

void FDynamicMeshChange::StoreFinalVertex ( const FDynamicMesh3 Mesh,
int  VertexID 
)

Store the final state of a vertex

◆ VerifySaveState()

void FDynamicMeshChange::VerifySaveState ( ) const

Do (limited) sanity checks on this MeshChange to ensure it is well-formed

Member Data Documentation

◆ AttributeChanges

TUniquePtr<FDynamicMeshAttributeChangeSet> UE::Geometry::FDynamicMeshChange::AttributeChanges
protected

◆ NewTriangles

TArray<FChangeTriangle> UE::Geometry::FDynamicMeshChange::NewTriangles
protected

◆ NewVertices

TArray<FChangeVertex> UE::Geometry::FDynamicMeshChange::NewVertices
protected

◆ OldTriangles

TArray<FChangeTriangle> UE::Geometry::FDynamicMeshChange::OldTriangles
protected

◆ OldVertices

TArray<FChangeVertex> UE::Geometry::FDynamicMeshChange::OldVertices
protected

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