FDynamicMeshEditor::DisconnectTriangles

Finds boundary loops of connected components of a set of triangles, and duplicates the vertices along the boundary, such that the triangles become disconnected.

Windows
MacOS
Linux

References

Module

DynamicMesh

Header

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

Include

#include "DynamicMeshEditor.h"

Source

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Private/DynamicMeshEditor.cpp

Syntax

bool DisconnectTriangles
(
    const TArray< int > & Triangles,
    TArray< FLoopPairSet > & LoopSetOut,
    bool bHandleBoundaryVertices
)

Remarks

Finds boundary loops of connected components of a set of triangles, and duplicates the vertices along the boundary, such that the triangles become disconnected. If the triangle set includes boundary vertices, they cannot be disconnected as they will become unreferenced. The function returns false if boundary vertices are found, unless bHandleBoundaryVertices = true. In that case, the boundary vertex is duplicated, and the original vertex is kept with the "Inner" loop. The new unreferenced vertex is left on the "Outer" loop, and the attached edges do not exist so are set as InvalidID. The [FLoopPairSet.bOuterIncludesIsolatedVertices](API\Plugins\DynamicMesh\FDynamicMeshEditor\FLoopPairSet\bOuterIncludesIs-) flag is set to true if boundary vertices are encountered. Note: This function can create a mesh with bowties if you pass in a subset of triangles that would have bowtie connectivity. (it is impossible to create the paired LoopSetOut with 1:1 vertex pairs without leaving in the bowties?)

Returns

true on success

Parameters

Parameter

Description

Triangles

set of triangles

LoopSetOut

set of boundary loops. LoopA is original loop which remains with "outer" triangles, and LoopB is new boundary loop of triangle set

bHandleBoundaryVertices

if true, boundary vertices are handled as described above, otherwise function aborts and returns false if a boundary vertex is encountered

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