TDynamicMeshAttributeChange

Implementation of mesh change tracking for [FDynamicMesh3](API\Plugins\DynamicMesh\FDynamicMesh3).

Windows
MacOS
Linux

Warnings

  • This class is meant to be used via FDynamicMeshChange and is not fully functional on its own (see comments in ApplyReplaceChange)

References

Module

DynamicMesh

Header

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

Include

#include "DynamicMeshChangeTracker.h"

Syntax

template<typename RealType, int ElementSize>
class TDynamicMeshAttributeChange

Remarks

Implementation of mesh change tracking for FDynamicMesh3.

The top-level class is FDynamicMeshChangeTracker, found at the bottom of this file. You create an instance of this and then call BeginChange(), then call SaveVertex()/SaveTriangle() before you make modifications to a vertex/triangle, and then call EndChange() at the end. This function emits a FDynamicMeshChange instance, and you can call Apply() to apply/revert it. So this is the object you would store in a higher-level undo/redo record, for example.

Attribute overlays make everything more complicated of course. Handling of these follows a similar structure - the MeshChangeTracker creates a FDynamicMeshAttributeSetChangeTracker, which in turn creates a TDynamicMeshAttributeChange for each UV and Normal overlay (grouped together in a FDynamicMeshAttributeChangeSet). However you don't have to explicitly do anything to get Attribute support, if the initial Mesh had attributes, then this all happens automatically, and the attribute changes get attached to the FDynamicMeshChange.

TDynamicMeshAttributeChange represents a change to an attribute overlay of a FDynamicMesh3.

This class is meant to be used via FDynamicMeshChange and is not fully functional on its own (see comments in ApplyReplaceChange)

Variables

Functions

Name Description

Public function Const

bool

 

Apply

(
    TDynamicMeshOverlay< RealType, Elem...,
    bool bRevert
)

Protected function Const

void

 

ApplyReplaceChange

(
    TDynamicMeshOverlay< RealType, Elem...,
    const TArray< FChangeTriangle >& R...,
    const TArray< FChangeElement >& In...,
    const TArray< RealType >& InsertEl...,
    const TArray< FChangeTriangle >& I...
)

Public function

void

 

SaveInitialElement

(
    const TDynamicMeshOverlay< RealType...,
    int ElementID
)

Public function

void

 

SaveInitialTriangle

(
    const TDynamicMeshOverlay< RealType...,
    int TriangleID
)

Public function

void

 

StoreFinalElement

(
    const TDynamicMeshOverlay< RealType...,
    int ElementID
)

Public function

void

 

StoreFinalTriangle

(
    const TDynamicMeshOverlay< RealType...,
    int TriangleID
)

Classes

Name

Description

Protected struct

FChangeElement

Protected struct

FChangeTriangle

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