Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/FDynamicMeshEditor
Description
Given a sequence of edges in the form given by ConvertLoopToTriVidPairSequence and a loop of vertices, stitch the two together. Edges are identified as (TriangleID, (0-2 subindex of vert1, 0-2 subindex of vert2)), and should match the number of vertex ids in the corresponding vertex loop (each i corresponds to the edge between vert i and i+1 in the vertex loop). This works much like StitchVertexLoopsMinimal, but it can be used after one of the loops undergoes vertex splits (to remove bowties) as long as the "loop" (which may now be broken) can still be identified by the composing triangles. In particular, this is used in extrude and inset where the base loop needs to remain as a sequence of Vids (since some of these may be free vertices, unattached to a triangle) but the offset/inset loop is guaranteed to be attached to triangles yet may have its Vids change due to bowtie splits.
If an entry of TriVidPairs1 resolves to verts [a,b] and the corresponding pair of verts in VertexLoop2 are [c,d], then tris added are [b,a,d] and [a,c,d].
| Name | StitchVertexLoopToTriVidPairSequence |
| Type | function |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMeshEditor.h |
| Include Path | #include "DynamicMeshEditor.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Private/DynamicMeshEditor.cpp |
bool StitchVertexLoopToTriVidPairSequence
(
const TArray < TPair< int32, TPair< int8, int8 > > > & TriVidPairs1,
const TArray < int > & VertexLoop2,
FDynamicMeshEditResult & ResultOut
)
true if operation succeeded. If a failure occurs, any added triangles are removed via RemoveTriangles
Parameters
| Name | Remarks |
|---|---|
| TriVidPairs1 | First loop, given as output of ConvertLoopToTriVidPairSequence() |
| VertexLoop2 | Second loop, given as vertex IDs |
| ResultOut | lists of newly created triangles/vertices/etc |