Navigation
API > API/Runtime > API/Runtime/GeometryCore
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/VertexConnectedComponents.h |
| Include | #include "VertexConnectedComponents.h" |
Syntax
class FVertexConnectedComponents
Remarks
Vertex-based connected components class can work with any mesh that has vertex IDs Also supports linking spatially-close vertices in the same component
Functions templated on TemplateMeshType are designed to work with any mesh that implements the standard MeshAdapter functions (see MeshAdapter.h) Functions templated on TriangleType are designed to work with triangles with vertex IDs that can be array-accessed (i.e.: Tri[0], Tri[1], Tri[2])
Variables
| Type | Name | Description | |
|---|---|---|---|
| FSizedDisjointSet | DisjointSet |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FVertexConnectedComponents
(
int32 MaxVertexID |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ConnectCloseVertices
(
const TriangleMeshType& Mesh, |
Note for meshes that may have floating (unreferenced) vertices, using a KeepSizeThreshold > 1 after calling ConnectTriangles will ensure the unreferenced vertices are skipped. | |
| void | ConnectOverlappingComponents
(
const TriangleMeshType& Mesh, |
TODO: support more overlap strategies, currently just uses AABB Note this merges components based on overlap of their bounding boxes as computed before any merges; multiple passes may merge additional components | |
| void | ConnectTriangles
(
TArrayView< const TriangleType > Triangles |
||
| void | ConnectTriangles
(
const TriangleMeshType& Mesh |
||
| void | ConnectVertices
(
int32 VertexID0, |
||
| bool | EnumerateContiguousComponentsFromArray
(
const TArray< int32 >& ContiguousComponentsArray, |
Apply ProcessComponentFn() to each connected component, or until the function returns false | |
| int32 | GetComponent
(
int32 VertexID |
||
| int32 | GetComponent
(
const TriangleType& Triangle |
||
| int32 | GetComponentSize
(
int32 VertexID |
||
| bool | HasMultipleComponents
(
const TriangleMeshType& Mesh, |
||
| bool | HasMultipleComponents
(
int32 MaxVID, |
||
| void | |||
| void | Init
(
const TriangleMeshType& Mesh |
||
| TMap< int32, int32 > | MakeComponentMap
(
const TriangleMeshType& Mesh, |
Map arbitrary set IDs to indices from 0 to k-1 (if there are k components) | |
| TMap< int32, int32 > | MakeComponentMap
(
int32 MaxVID, |
||
| TArray< int32 > | MakeContiguousComponentsArray
(
int32 MaxVID |
Return an ordering of the vertex indices so that each connected component is in a contiguous block. |