FDynamicMeshChangeTracker

[FDynamicMeshChangeTracker](API\Plugins\DynamicMesh\FDynamicMeshChangeTracker) tracks changes to a FDynamicMesh and returns a [FDynamicMeshChange](API\Plugins\DynamicMesh\FDynamicMeshChange) instance that represents this change and allows it to be reverted/reapplied.

Windows
MacOS
Linux

Warnings

  • Currently only vertices that are part of saved triangles will be stored in the emitted FMeshChange!

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/DynamicMeshChangeTracker.h

Include

#include "DynamicMeshChangeTracker.h"

Syntax

class FDynamicMeshChangeTracker

Remarks

FDynamicMeshChangeTracker tracks changes to a FDynamicMesh and returns a FDynamicMeshChange instance that represents this change and allows it to be reverted/reapplied. This is the top-level class you likely want to use to track mesh changes.

Call BeginChange() before making any changes to the mesh, then call SaveVertex() and SaveTriangle() before modifying the respective elements. Then call EndChange() to construct a FDynamicMeshChange that represents the mesh delta.

Currently only vertices that are part of saved triangles will be stored in the emitted FMeshChange!

Variables

Name Description

Protected variable

FDynamicMeshAtt...

 

AttribChangeTracker

Active attribute tracker, if Mesh has attribute overlays

Protected variable

FDynamicMeshCha...

 

Change

Active change that is being constructed

Protected variable

TBitArray

 

ChangedTriangles

Protected variable

TBitArray

 

ChangedVertices

Protected variable

int32

 

MaxTriangleID

Protected variable

int32

 

MaxVertexID

Protected variable

const FDynamicM...

 

Mesh

Protected variable

TBitArray

 

StartTriangles

Protected variable

TBitArray

 

StartVertices

Constructors

Name Description

Public function

FDynamicMeshChangeTracker

(
    const FDynamicMesh3* Mesh
)

Destructors

Name Description

Public function

~FDynamicMeshChangeTracker()

Functions

Name Description

Public function

void

 

BeginChange()

Initialize the change-tracking process

Public function

TUniquePtr< ...

 

EndChange()

Construct a change object that represents the delta between the Begin and End states

Public function

void

 

SaveEdge

(
    int32 EdgeID,
    bool bVertices
)

Save necessary information about an edge before it is modified

Public function

void

 

SaveTriangle

(
    int32 TriangleID,
    bool bSaveVertices
)

Save necessary information about a triangle before it is modified

Public function

void

 

SaveTriangles

(
    EnumerableType TriangleIDs,
    bool bSaveVertices
)

Save necessary information about a set of triangles before they are modified

Public function

void

 

SaveTrianglesAndNeighbourTris

(
    EnumerableType TriangleIDs,
    bool bSaveVertices
)

Save necessary information about a set of triangles before they are modified, and also include any direct triangle neighbours

Protected function

void

 

SaveVertex

(
    int32 VertexID
)

Currently EndChange() only stores vertices that are part of modified triangles.

Public function

void

 

SaveVertexOneRingTriangles

(
    int32 VertexID,
    bool bSaveVertices
)

Save necessary information about a set of triangles in one-ring of a vertex

Public function

void

 

SaveVertexOneRingTriangles

(
    EnumerableType VertexIDs,
    bool bSaveVertices
)

Save necessary information about a set of triangles in one-rings of a set of vertices

Protected function

void

 

SaveVertices

(
    EnumerableType VertexIDs
)

Save necessary information about a set of vertices before they are modified

Public function

void

 

VerifySaveState()

Do (limited) sanity checking to make sure that the change is well-formed

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss