Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/TDynamicMeshOverlay
Description
Create a new copy of ElementID, and update connected triangles in the TrianglesToUpdate array to reference the copy of ElementID where they used to reference ElementID. The new element will have the given parent vertex ID. Deletes any elements that are no longer used after the triangles are changed.
| Name | SplitElementWithNewParent |
| Type | function |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMeshOverlay.h |
| Include Path | #include "DynamicMesh/DynamicMeshOverlay.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Private/DynamicMesh/DynamicMeshOverlay.cpp |
int SplitElementWithNewParent
(
int ElementID,
int SplitParentVertexID,
const TArrayView < const int > & TrianglesToUpdate
)
the ID of the newly created element
Parameters
| Name | Remarks |
|---|---|
| ElementID | the element to copy |
| SplitParentVertexID | the new parent vertex for copied elements |
| TrianglesToUpdate | the triangles that should now reference the new element. Note: this is allowed to include triangles that do not have the element at all; sometimes you may want to do so to avoid creating a new array for each call. |