![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshConnectedComponents.h>
Classes | |
| struct | FComponent |
Public Attributes | |
| const FDynamicMesh3 * | Mesh |
| TIndirectArray< FComponent > | Components |
FMeshConnectedComponents calculates Connected Components of a Mesh, or sub-regions of a Mesh. By default the actual mesh connectivity is used, but an optional connectivity predicate can be provided to specify when two elements should be considered connected.
|
inline |
|
inline |
DO NOT USE DIRECTLY STL-like iterators to enable ranged-based for loop support (forwarding TIndirectArray declarations)
|
inline |
|
inline |
|
inline |
| void FMeshConnectedComponents::FindConnectedTriangles | ( | const TArray< int > & | TriangleROI, |
| TFunction< bool(int32, int32)> | TrisConnectedPredicate = nullptr |
||
| ) |
Find all connected triangle components of a subset of triangles of the Mesh and store in Components array. Triangle connectivity is based on edge connectivity, ie bowtie-vertices are not connections between triangles.
| TriangleROI | list of triangles to search across |
| TrisConnectedPredicate | optional function that specifies whether two edge-connected triangles should be considered connected by the search |
| void FMeshConnectedComponents::FindConnectedTriangles | ( | TFunction< bool(int32, int32)> | TrisConnectedPredicate = nullptr | ) |
Find all connected triangle components of the Mesh and store in Components array. Triangle connectivity is based on edge connectivity, ie bowtie-vertices are not connections between triangles.
| TrisConnectedPredicate | optional function that specifies whether two edge-connected triangles should be considered connected by the search |
| void FMeshConnectedComponents::FindConnectedTriangles | ( | TFunctionRef< bool(int)> | IndexFilterFunc, |
| TFunction< bool(int32, int32)> | TrisConnectedPredicate = nullptr |
||
| ) |
Find all connected triangle components of a subset of triangles of the Mesh and store in Components array. Triangle connectivity is based on edge connectivity, ie bowtie-vertices are not connections between triangles.
| IndexFilterFunc | defines set of triangles to search across, return true for triangle IDs that are to be considered |
| TrisConnectedPredicate | optional function that specifies whether two edge-connected triangles should be considered connected by the search |
| void FMeshConnectedComponents::FindConnectedVertices | ( | const TArray< int > & | VertexROI, |
| TFunction< bool(int32, int32)> | VertsConnectedPredicate = nullptr |
||
| ) |
Find all connected vertex components of a subset of vertices of the Mesh and store in Components array.
| VertexROI | list of vertices to search across |
| VertsConnectedPredicate | optional function that specifies whether two edge-connected vertices should be considered connected by the search |
| void FMeshConnectedComponents::FindConnectedVertices | ( | TFunction< bool(int32, int32)> | VertsConnectedPredicate = nullptr | ) |
Find all connected vertex components of the Mesh and store in Components array.
| VertsConnectedPredicate | optional function that specifies whether two edge-connected vertices should be considered connected by the search |
| void FMeshConnectedComponents::FindConnectedVertices | ( | TFunctionRef< bool(int)> | IndexFilterFunc, |
| TFunction< bool(int32, int32)> | VertsConnectedPredicate = nullptr |
||
| ) |
Find all connected vertex components of a subset of vertices of the Mesh and store in Components array.
| IndexFilterFunc | defines set of vertices to search across, return true for vertex IDs that are to be considered |
| VertsConnectedPredicate | optional function that specifies whether two edge-connected vertices should be considered connected by the search |
| void FMeshConnectedComponents::FindTrianglesConnectedToSeeds | ( | const TArray< int > & | SeedTriangles, |
| TFunction< bool(int32, int32)> | TrisConnectedPredicate = nullptr |
||
| ) |
Find all connected triangle components that contain one or more Seed Triangles and store in Components array. Search only starts from Seed Triangles. Triangle connectivity is based on edge connectivity, ie bowtie-vertices are not connections between triangles.
| SeedTriangles | list of start triangles, each component contains at least one of these triangles |
| TrisConnectedPredicate | optional function that specifies whether two edge-connected triangles should be considered connected by the search |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void FMeshConnectedComponents::FindVerticesConnectedToSeeds | ( | const TArray< int > & | SeedVertices, |
| TFunction< bool(int32, int32)> | VertsConnectedPredicate = nullptr |
||
| ) |
Find all connected vertex components that contain one or more Seed Vertices and store in Components array. Search only starts from Seed Vertices.
| SeedVertices | list of start vertices, each component contains at least one of these vertices |
| VertsConnectedPredicate | optional function that specifies whether two edge-connected vertices should be considered connected by the search |
|
inline |
|
inline |
| int32 FMeshConnectedComponents::GetLargestIndexByCount | ( | ) | const |
|
static |
Utility function to expand an edge selection to all edges considered "connected".
| Mesh | Mesh to calculate on |
| InputROI | input set of edges |
| ResultROI | output set of edges connected to InputROI |
| QueueBuffer | optional buffer used as internal Queue. If passed as nullptr, a TArray will be locally allocated |
| CanGrowPredicate | determines whether two connected mesh edges should be considered connected while growing |
|
static |
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)
| 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 |
|
static |
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) This version computes an output TSet instead of output TArray, which is preferable in some cases.
| 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 |
| CanGrowPredicate | determines whether two connected mesh triangles should be considered connected while growing |
|
static |
Utility function to expand a vertex selection to all vertices considered "connected".
| Mesh | Mesh to calculate on |
| InputROI | input set of vertices |
| ResultROI | output set of vertices connected to InputROI |
| QueueBuffer | optional buffer used as internal Queue. If passed as nullptr, a TArray will be locally allocated |
| CanGrowPredicate | determines whether two connected mesh vertices should be considered connected while growing |
| bool FMeshConnectedComponents::InitializeFromTriangleComponents | ( | const TArray< TArray< int32 > > & | ComponentLists, |
| bool | bValidateIDs | ||
| ) |
Initialize the internal FComponent list from the input ComponentLists, skipping any empty input lists
| bValidateIDs | if true, test that each value corresponds to a valid triangle ID on the Mesh |
| bool FMeshConnectedComponents::InitializeFromTriangleComponents | ( | TArray< TArray< int32 > > & | ComponentLists, |
| bool | bMoveSubLists, | ||
| bool | bValidateIDs | ||
| ) |
Initialize the internal FComponent list from the input ComponentLists, skipping any empty input lists
| bMoveSubLists | if true, steal the arrays inside the ComponentLists (via MoveTemp), to avoid memory copies |
| bValidateIDs | if true, test that each value corresponds to a valid triangle ID on the Mesh |
| bool FMeshConnectedComponents::InitializeFromVertexComponents | ( | const TArray< TArray< int32 > > & | ComponentLists, |
| bool | bValidateIDs | ||
| ) |
Initialize the internal FComponent list from the input ComponentLists, skipping any empty input lists
| bValidateIDs | if true, test that each value corresponds to a valid vertex ID on the Mesh |
| bool FMeshConnectedComponents::InitializeFromVertexComponents | ( | TArray< TArray< int32 > > & | ComponentLists, |
| bool | bMoveSubLists, | ||
| bool | bValidateIDs | ||
| ) |
Initialize the internal FComponent list from the input ComponentLists, skipping any empty input lists
| bMoveSubLists | if true, steal the arrays inside the ComponentLists (via MoveTemp), to avoid memory copies |
| bValidateIDs | if true, test that each value corresponds to a valid vertex ID on the Mesh |
|
inline |
|
inline |
|
inline |
|
protected |
Sort the Components array by component element count
| bLargestFirst | if true, sort by decreasing count, otherwise by increasing count |
| TIndirectArray<FComponent> UE::Geometry::FMeshConnectedComponents::Components |
List of Connected Components that have been found by one of the calculation functions
| const FDynamicMesh3* UE::Geometry::FMeshConnectedComponents::Mesh |