USimpleDynamicMeshComponent

[USimpleDynamicMeshComponent](API\Plugins\ModelingComponents\USimpleDynamicMeshComponent) is a mesh component similar to [UProceduralMeshComponent](API\Plugins\ProceduralMeshComponent\UProceduralMeshComponent), except it bases the renderable geometry off an internal [FDynamicMesh3](API\Plugins\DynamicMesh\FDynamicMesh3) instance.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/SimpleDynamicMeshComponent.h

Include

#include "SimpleDynamicMeshComponent.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(HideCategories=(LOD, Physics, Collision), EditInlineNew, ClassGroup=Rendering)
class USimpleDynamicMeshComponent : public UBaseDynamicMeshComponent

Remarks

USimpleDynamicMeshComponent is a mesh component similar to UProceduralMeshComponent , except it bases the renderable geometry off an internal FDynamicMesh3 instance.

There is some support for undo/redo on the component (

This component draws wireframe-on-shaded when Wireframe is enabled, or when bExplicitShowWireframe = true

Variables

Name Description

Public variable UProperty

bool

 

bDrawOnTop

Do not use this

Public variable UProperty

bool

 

bExplicitShowWireframe

If true, we always show the wireframe on top of the shaded mesh, even when not in wireframe mode

Public variable UProperty

bool

 

bInvalidateProxyOnChange

If false, we don't completely invalidate the RenderProxy when ApplyChange() is called (assumption is it will be handled elsewhere)

Public variable

FSimpleMulticas...

 

OnMeshChanged

This delegate fires when a FCommandChange is applied to this component, so that parent objects know the mesh has changed.

Public variable

FMeshVerticesMo ...

 

OnMeshVerticesChanged

Public variable UProperty

EDynamicMeshTan ...

 

TangentsType

How should Tangents be calculated/handled

Public variable

TFunction < FCol ...

 

TriangleColorFunc

If this function is set, we will use these colors instead of vertex colors

Constructors

Name Description

Public function

USimpleDynamicMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

void

 

Bake

(
    FMeshDescription * MeshDescript...,
    bool bHaveModifiedTopology
)

Write the internal mesh to a MeshDescription with default conversion options

Public function Virtual

void

 

DisableSecondaryTriangleBuffers()

Disable secondary triangle buffers. This invalidates the SceneProxy.

Public function Virtual

void

 

EnableSecondaryTriangleBuffers

(
    TUniqueFunction < bool ...
)

If Secondary triangle buffers are enabled, then we will filter triangles that pass the given predicate function into a second index buffer.

Public function

TUniquePtr < ...

 

ExtractMesh

(
    bool bNotifyUpdate
)

Public function

void

 

FastNotifyColorsUpdated()

Call this instead of NotifyMeshUpdated() if you have only updated the vertex colors (or triangle color function).

Public function

void

 

FastNotifyPositionsUpdated

(
    bool bNormals,
    bool bColors,
    bool bUVs
)

Call this instead of NotifyMeshUpdated() if you have only updated the vertex positions (and possibly some attributes).

Public function

void

 

FastNotifySecondaryTrianglesChanged()

Call this instead of NotifyMeshUpdated() if you have only updated secondary triangle sorting.

Public function

void

 

FastNotifyTriangleVerticesUpdated

(
    const TArray < int32 >& Triangles,
    EMeshRenderAttributeFlags UpdatedAt...
)

This function updates vertex positions/attributes of existing SceneProxy render buffers if possible, for the given triangles.

Public function

void

 

FastNotifyTriangleVerticesUpdated

(
    const TSet < int32 >& Triangles,
    EMeshRenderAttributeFlags UpdatedAt...
)

This function updates vertex positions/attributes of existing SceneProxy render buffers if possible, for the given triangles.

Public function

void

 

FastNotifyUVsUpdated()

Call this instead of NotifyMeshUpdated() if you have only updated the vertex uvs.

Public function

void

 

FastNotifyVertexAttributesUpdated

(
    EMeshRenderAttributeFlags UpdatedAt...
)

Call this instead of NotifyMeshUpdated() if you have only updated the vertex positions/attributes This function will update the existing RenderProxy buffers if possible, rather than create new ones.

Public function

void

 

FastNotifyVertexAttributesUpdated

(
    bool bNormals,
    bool bColors,
    bool bUVs
)

Call this instead of NotifyMeshUpdated() if you have only updated the vertex attributes (but not positions).

Public function

const FMeshT ...

 

GetTangents()

Calling this with TangentsType = AutoCalculated will result in possibly-expensive Tangents calculation

Public function

void

 

SetDrawOnTop

(
    bool bSet
)

Do not use this

Public function Virtual

void

 

SetExternalDecomposition

Configure a decomposition of the mesh, which will result in separate render buffers for each decomposition triangle group.

Public function

void

 

UpdateTangents

(
    const FMeshTangentsf * External...,
    bool bFastUpdateIfPossible
)

Copy externally-calculated tangents into the internal tangets buffer.

Public function

void

 

UpdateTangents

(
    const FMeshTangentsd * External...,
    bool bFastUpdateIfPossible
)

Copy externally-calculated tangents into the internal tangets buffer.

Overridden from UBaseDynamicMeshComponent

Name Description

Public function Virtual

void

 

ApplyTransform

(
    const FTransform3d & Transform,
    bool bInvert
)

Apply transform to internal mesh. Updates Octree and RenderProxy if available.

Public function Virtual

void

 

Bake

(
    FMeshDescription * MeshDescript...,
    bool bHaveModifiedTopology,
    const FConversionToMeshDescriptionO ...
)

Write the internal mesh to a MeshDescription

Public function Virtual Const

bool

 

EnableWireframeRenderPass()

Public function Virtual

FDynamicMesh ...

 

GetMesh()

Public function Virtual Const

const FDynam ...

 

GetMesh()

Public function Virtual

void

 

InitializeMesh

(
    FMeshDescription * MeshDescript...
)

Initialize the internal mesh from a MeshDescription

Protected function Virtual

void

 

NotifyMaterialSetUpdated()

This is called to tell our RenderProxy about modifications to the material set.

Public function Virtual

void

 

NotifyMeshUpdated()

Change tracking/etc Call this if you update the mesh via GetMesh() .

Public function Virtual

void

 

SetEnableWireframeRenderPass

(
    bool bEnable
)

Configure whether wireframe rendering is enabled or not

Overridden from IMeshVertexCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

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

Apply a vertex deformation change to the internal mesh

Overridden from IMeshCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

(
    const FMeshChange * Change,
    bool bRevert
)

Apply a general mesh change to the internal mesh

Overridden from IMeshReplacementCommandChangeTarget

Name Description

Public function Virtual

void

 

ApplyChange

(
    const FMeshReplacementChange * ...,
    bool bRevert
)

Apply a general mesh replacement change to the internal mesh

Typedefs

Name

Description

FMeshVerticesModified

This delegate fires when ApplyChange(FMeshVertexChange) executes

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback