UDynamicMesh

[UDynamicMesh](API\Runtime\GeometryFramework\UDynamicMesh) is a [UObject](API\Runtime\CoreUObject\UObject\UObject) container for a FDynamicMesh3.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

GeometryFramework

Header

/Engine/Source/Runtime/GeometryFramework/Public/UDynamicMesh.h

Include

#include "UDynamicMesh.h"

Syntax

class UDynamicMesh :
    public UObject,
    public IMeshVertexCommandChangeTarget,
    public IMeshCommandChangeTarget,
    public IMeshReplacementCommandChangeTarget

Remarks

UDynamicMesh is a UObject container for a FDynamicMesh3.

Variables

Name Description

Public variable

bool

 

bEnableMeshGenerator

Controls whether the active Generator (if configured) will be applied when rebuilding the mesh

Protected variable

TUniquePtr< UE:...

 

Mesh

Mesh data, owned by this object.

Protected variable

FOnDynamicMeshC...

 

MeshChangedEvent

Broadcast after the internal mesh is modified, in the same cases as PreMeshChangedEvent

Protected variable

TObjectPtr< UDy...

 

MeshGenerator

(Preliminary) Procedural Generator support.

Public variable

FOnDynamicMeshM...

 

MeshModifiedBPEvent

Blueprintable event called when mesh is modified, in the same cases as OnMeshChanged

Protected variable

FOnMeshRealtime...

 

MeshRealtimeUpdateEvent

Protected variable

FOnDynamicMeshC...

 

PreMeshChangedEvent

Event supportBroadcast before the internal mesh is modified by Reset funcs, SetMesh(), EditMesh(), and ApplyChange()'s above

Constructors

Name Description

Public function

UDynamicMesh

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

ClearMeshGenerator()

Set the active mesh generator. Clears if nullptr

Public function

void

 

EditMesh

(
    TFunctionRef< void...,
    EDynamicMeshChangeType ChangeType,
    EDynamicMeshAttributeChangeFlags Ch...,
    bool bDeferChangeEvents
)

Apply EditFunc to the internal mesh.

Protected function

void

 

EditMeshInternal

(
    TFunctionRef< void...,
    const FDynamicMeshChangeInfo& Chan...,
    bool bDeferChangeEvents
)

Internal function that edits the Mesh, but broadcasts PreMeshChangedEvent and MeshChangedEvent, and then MeshModifiedBPEvent

Public function

TUniquePtr< ...

 

ExtractMesh()

Take ownership of the internal Mesh, and have it replaced with a new mesh

Public function Const

const UE::Ge...

 

GetMeshPtr()

Calling ProcessMesh() is preferred! This interface may be removed in the future

Public function

UE::Geometry...

 

GetMeshPtr()

Calling EditMesh() is preferred! This interface may be removed in the future

Public function

UE::Geometry...

 

GetMeshRef()

Calling EditMesh() is preferred! This interface may be removed in the future

Public function Const

const UE::Ge...

 

GetMeshRef()

Calling ProcessMesh() is preferred! This interface may be removed in the future

Public function Const

int32

 

GetTriangleCount()

Public function Virtual

void

 

InitializeMesh()

Native access/modification functions Reset the internal mesh data and then optionally run the MeshGenerator

Protected function

void

 

InitializeNewMesh()

Allocate a new Mesh (ie pointer will change) and then call InitializeMesh()

Public function Const

bool

 

IsEmpty()

Public function

FOnDynamicMe...

 

OnMeshChanged()

Broadcast after the internal mesh is modified, in the same cases as OnPreMeshChanged

Public function

FOnMeshRealt...

 

OnMeshRealtimeUpdate()

Multicast delegate that is broadcast whenever PostRealtimeUpdate() is called

Public function

FOnDynamicMe...

 

OnPreMeshChanged()

Broadcast before the internal mesh is modified by Reset funcs, SetMesh(), EditMesh(), and ApplyChange()'s above

Public function Virtual

void

 

PostRealtimeUpdate()

Broadcasts FOnMeshRealtimeUpdate

Public function Const

void

 

ProcessMesh

(
    TFunctionRef< void...
)

Apply ProcessFunc to the internal Mesh

Public function Virtual

void

 

Regenerate()

Reset() the mesh, which will re-run the active MeshGenerator, if bEnableMeshGenerator

Public function

UDynamicMesh...

 

Reset()

Clear the internal mesh to an empty mesh.

Public function

UDynamicMesh...

 

ResetToCube()

Clear the internal mesh to a 100x100x100 cube with base at the origin.

Public function

void

 

SetMesh

(
    const UE::Geometry::FDynamicMesh3&...
)

Replace the internal mesh with a copy of MoveMesh

Public function

void

 

SetMesh

(
    UE::Geometry::FDynamicMesh3&& Move...
)

Replace the internal mesh with the data in MoveMesh

Public function Virtual

void

 

SetMeshGenerator

Set the active mesh generator. Clears if nullptr

Overridden from UObject

Name Description

Public function Virtual

void

 

ExportCustomProperties

(
    FOutputDevice& Out,
    uint32 Indent
)

Serialize Mesh to/from T3D

Public function Virtual

void

 

ImportCustomProperties

(
    const TCHAR* SourceText,
    FFeedbackContext* Warn
)

Exports the property values for the specified object as text to the output device.

Public function Virtual

void

 

Serialize

(
    FArchive& Archive
)

Serialize Mesh to an Archive

Overridden from IMeshVertexCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

(
    const FMeshVertexChange* Chang...,
    bool bRevert
)

IMeshVertexCommandChangeTarget implementation, allows a FVertexChange to be applied to the mesh.

Overridden from IMeshCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

(
    const FMeshChange* Change,
    bool bRevert
)

IMeshCommandChangeTarget implementation, allows a FMeshChange to be applied to the mesh.

Overridden from IMeshReplacementCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

(
    const FMeshReplacementChange* ...,
    bool bRevert
)

IMeshReplacementCommandChangeTarget implementation, allows a FMeshReplacementChange to be applied to the mesh.

Typedefs

Name

Description

FOnMeshRealtimeUpdate

Realtime Update support.