Navigation
API > API/Runtime > API/Runtime/GeometryCore
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])
| Name | FVertexConnectedComponents |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/VertexConnectedComponents.h |
| Include Path | #include "VertexConnectedComponents.h" |
Syntax
class FVertexConnectedComponents
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVertexConnectedComponents
(
int32 MaxVertexID |
VertexConnectedComponents.h | ||
| VertexConnectedComponents.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
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. | VertexConnectedComponents.h | |
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 | VertexConnectedComponents.h | |
void ConnectTriangles
(
TArrayView< const TriangleType > Triangles |
VertexConnectedComponents.h | ||
void ConnectTriangles
(
const TriangleMeshType& Mesh |
VertexConnectedComponents.h | ||
void ConnectVertices
(
int32 VertexID0, |
VertexConnectedComponents.h | ||
bool EnumerateContiguousComponentsFromArray
(
const TArray< int32 >& ContiguousComponentsArray, |
Apply ProcessComponentFn() to each connected component, or until the function returns false | VertexConnectedComponents.h | |
int32 GetComponent
(
int32 VertexID |
VertexConnectedComponents.h | ||
int32 GetComponent
(
const TriangleType& Triangle |
VertexConnectedComponents.h | ||
int32 GetComponentSize
(
int32 VertexID |
VertexConnectedComponents.h | ||
bool HasMultipleComponents
(
const TriangleMeshType& Mesh, |
VertexConnectedComponents.h | ||
bool HasMultipleComponents
(
int32 MaxVID, |
VertexConnectedComponents.h | ||
void Init
(
int32 MaxVertexID |
VertexConnectedComponents.h | ||
void Init
(
const TriangleMeshType& Mesh |
VertexConnectedComponents.h | ||
TMap< int32, int32 > MakeComponentMap
(
const TriangleMeshType& Mesh, |
Map arbitrary set IDs to indices from 0 to k-1 (if there are k components) | VertexConnectedComponents.h | |
TMap< int32, int32 > MakeComponentMap
(
int32 MaxVID, |
VertexConnectedComponents.h | ||
TArray< int32 > MakeContiguousComponentsArray
(
int32 MaxVID |
Return an ordering of the vertex indices so that each connected component is in a contiguous block. | VertexConnectedComponents.h |