FMeshRenderDecomposition

[FMeshRenderDecomposition](API\Runtime\GeometryFramework\Components\FMeshRenderDecomposition) represents a decomposition of a mesh into "chunks" of triangles, with associated materials.

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryFramework

Header

/Engine/Source/Runtime/GeometryFramework/Public/Components/MeshRenderDecomposition.h

Include

#include "Components/MeshRenderDecomposition.h"

Syntax

class FMeshRenderDecomposition

Remarks

FMeshRenderDecomposition represents a decomposition of a mesh into "chunks" of triangles, with associated materials. This is passed to the rendering components to split a mesh into multiple RenderBuffers, for more efficient updating.

Variables

Name Description

Public variable

TArray< TUnique...

 

Groups

Public variable

TArray< int32 >

 

TriangleToGroupMap

Mapping from TriangleID to Groups array index.

Constructors

Name Description

Public function

FMeshRenderDecomposition()

TArray member cannot be default-constructed (in this case we just make it NonCopyable)

Public function

FMeshRenderDecomposition

Movable.

Public function

FMeshRenderDecomposition

(
    const FMeshRenderDecomposition&
)

Functions

Name Description

Public function

int32

 

AppendGroup()

Public function

void

 

BuildAssociations

(
    const FDynamicMesh3* Mesh
)

Construct mappings between mesh and groups (eg TriangleToGroupMap)

Public function Static

void

 

BuildChunkedDecomposition

(
    const FDynamicMesh3* Mesh,
    const FComponentMaterialSet* M...,
    FMeshRenderDecomposition& Decomp,
    int32 MaxChunkSize
)

Build per-material decomposition, and then split each of those into chunks of at most MaxChunkSize (actual chunk sizes will be highly variable and some may be very small...)

Public function Static

void

 

BuildMaterialDecomposition

(
    const FDynamicMesh3* Mesh,
    const FComponentMaterialSet* M...,
    FMeshRenderDecomposition& Decomp
)

Build decomposition with one group for each MaterialID of mesh

Public function

FGroup &

 

GetGroup

(
    int32 Index
)

Public function Const

const FGroup...

 

GetGroup

(
    int32 Index
)

Public function Const

int32

 

GetGroupForTriangle

(
    int32 TriangleID
)

Public function

void

 

Initialize

(
    int32 Count
)

Public function Const

bool

 

IsGroup

(
    int32 Index
)

Public function Const

int32

 

Num()

Operators

Name Description

Public function

FMeshRenderD...

 

operator=

Public function

FMeshRenderD...

 

operator=

(
    const FMeshRenderDecomposition&
)

Classes

Name

Description

Public struct

FGroup