FMeshConnectedComponents::GrowToConnectedTriangles

Utility function to expand a triangle selection to all triangles considered "connected".

Windows
MacOS
Linux

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/Selections/MeshConnectedComponents.h

Include

#include "Selections/MeshConnectedComponents.h"

Source

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Private/Selections/MeshConnectedComponents.cpp

Syntax

static void GrowToConnectedTriangles
(
    const FDynamicMesh3 * Mesh,
    const TArray< int > & InputROI,
    TArray< int > & ResultROI,
    TArray< int32 > * QueueBuffer,
    TSet< int32 > * DoneBuffer,
    TFunctionRef< bool, int32)> CanGrowPredicate
)

Remarks

Utility function to expand a triangle selection to all triangles considered "connected". More efficient than using full FMeshConnectedComponents instance if ROI is small relative to Mesh size (or if temp buffers can be re-used)

Parameters

Parameter

Description

Mesh

Mesh to calculate on

InputROI

input set of triangles

ResultROI

output set of triangles connected to InputROI

QueueBuffer

optional buffer used as internal Queue. If passed as nullptr, a TArray will be locally allocated

DoneBuffer

optional set used to track which triangles have already been processed. If passed as nullptr, an TSet will be locally allocated

CanGrowPredicate

determines whether two connected mesh triangles should be considered connected while growing

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