Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/DynamicMesh > API/Runtime/GeometryCore/DynamicMesh/FDynamicMesh3 > API/Runtime/GeometryCore/DynamicMesh/FDynamicMesh3/MergeVertices
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMesh3.h |
| Include | #include "DynamicMesh/DynamicMesh3.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Private/DynamicMesh/DynamicMesh3_Edits.cpp |
virtual EMeshResult MergeVertices
(
int KeepVid,
int DiscardVid,
double InterpolationT,
const FMergeVerticesOptions & Options,
FMergeVerticesInfo & MergeInfo
)
Remarks
Weld DiscardVid to KeepVid, if topologically possible and options allow. If the vertices are connected by an existing edge, this resolves as a collapse of that edge, and therefore calls OnCollapseEdge in overlays. If not, but the two vertices share a vertex neighbor, this resolves as a weld of the intervening edges (failing if the edges are not boundary edges, since that would create non-manifold edge), and therefore calls OnMergeEdges in the overlays. Otherwise, the merge resolves as bowtie creation, and calls OnMergeVertices in the overlays. Ok on success, or enum value indicates why operation cannot be applied. Mesh remains unmodified on error.
Parameters
| Name | Description |
|---|---|
| KeepVid | vertex ID of the kept vertex |
| DiscardVid | vertex ID of the vertex whose triangles are reattached to the kept vertex |
| InterpolationT | the kept vertex is moved to Lerp(KeptPos, RemovePos, InterpolationT) |
| Options | set the options for the merge |
| MergeInfo | returned information about new and modified mesh elements |