![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshRegionBoundaryLoops.h>
Public Types | |
| template<typename ElementType > | |
| using | ElementIDAndValue = TPair< int32, ElementType > |
| template<typename ElementType > | |
| using | VidOverlayMap = TMap< int32, ElementIDAndValue< ElementType > > |
Static Public Member Functions | |
| static GEOMETRYCORE_API bool | GetTriangleSetBoundaryLoop (const FDynamicMesh3 &Mesh, const TArray< int32 > &Tris, FEdgeLoop &Loop) |
Public Attributes | |
| const FDynamicMesh3 * | Mesh = nullptr |
| TArray< FEdgeLoop > | Loops |
| bool | bFailed = false |
Protected Member Functions | |
| bool | IsEdgeOnBoundary (int eid) const |
| GEOMETRYCORE_API bool | IsEdgeOnBoundary (int eid, int &tid_in, int &tid_out) const |
| GEOMETRYCORE_API FIndex2i | GetOrientedEdgeVerts (int eID, int tid_in) |
| GEOMETRYCORE_API int | GetVertexBoundaryEdges (int vID, int &e0, int &e1) |
| GEOMETRYCORE_API int | GetAllVertexBoundaryEdges (int vID, TArray< int > &e) |
| GEOMETRYCORE_API FVector3d | GetVertexNormal (int vid) |
| GEOMETRYCORE_API int | FindLeftTurnEdge (int incoming_e, int bowtie_v, TArray< int > &bdry_edges, int bdry_edges_count, const FIndexFlagSet &used_edges) |
| GEOMETRYCORE_API bool | TryExtractSubloops (TArray< int > &loopV, const TArray< int > &loopE, const TArray< int > &bowties, TArray< FEdgeLoop > &SubLoopsOut) |
Protected Attributes | |
| FIndexFlagSet | Triangles |
| FIndexFlagSet | Edges |
| TArray< int > | edges_roi |
Extract FEdgeLoops on the boundary of a set of triangles of a mesh.
| using UE::Geometry::FMeshRegionBoundaryLoops::ElementIDAndValue = TPair<int32, ElementType> |
| using UE::Geometry::FMeshRegionBoundaryLoops::VidOverlayMap = TMap<int32, ElementIDAndValue<ElementType> > |
|
inline |
| FMeshRegionBoundaryLoops::FMeshRegionBoundaryLoops | ( | const FDynamicMesh3 * | MeshIn, |
| const TArray< int > & | RegionTris, | ||
| bool | bAutoCompute = true |
||
| ) |
| bool FMeshRegionBoundaryLoops::Compute | ( | ) |
Find set of FEdgeLoops on the border of the input triangle set
|
protected |
|
protected |
|
inline |
| bool UE::Geometry::FMeshRegionBoundaryLoops::GetLoopOverlayMap | ( | const FEdgeLoop & | LoopIn, |
| const TDynamicMeshOverlay< StorageType, ElementSize > & | Overlay, | ||
| VidOverlayMap< ElementType > & | LoopVidsToOverlayElementsOut | ||
| ) |
| GEOMETRYCORE_API bool UE::Geometry::FMeshRegionBoundaryLoops::GetLoopOverlayMap | ( | const FEdgeLoop & | LoopIn, |
| const TDynamicMeshOverlay< StorageType, ElementSize > & | Overlay, | ||
| VidOverlayMap< ElementType > & | LoopVidsToOverlayElementsOut | ||
| ) |
Generates a map from vertex ID's of the loop vertices to corresponding overlay element ID's and values. The elements chosen are those associated with the internal triangle whose edge goes out of that vertex in the loop direction. The function is useful in cases where the triangles inside the loop will be deleted and replaced, and we want to keep the same UV's on the border vertices. Does not clear LoopVidsToOverlayElementsOut before use (simply adds to it), so could be used for multiple loops.
| int FMeshRegionBoundaryLoops::GetMaxVerticesLoopIndex | ( | ) | const |
|
protected |
|
static |
Find the edge loop border around a set of triangles of a Mesh. This is computed via local walk and so does not create any full-mesh data structures. However current implementation may not be efficient for large triangle sets. Algorithm terminates if a non-manifold boundary is detected, and returns false if some triangles are unused.
| Loop | output loop will be stored here. This value is garbage if false is returned. |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
inline |
|
inline |
| void FMeshRegionBoundaryLoops::SetMesh | ( | const FDynamicMesh3 * | MeshIn, |
| const TArray< int > & | RegionTris | ||
| ) |
|
protected |
| void UE::Geometry::FMeshRegionBoundaryLoops::UpdateLoopOverlayMapValidity | ( | VidOverlayMap< ElementType > & | LoopVidsToOverlayElements, |
| const TDynamicMeshOverlay< StorageType, ElementSize > & | Overlay | ||
| ) |
| GEOMETRYCORE_API void UE::Geometry::FMeshRegionBoundaryLoops::UpdateLoopOverlayMapValidity | ( | VidOverlayMap< ElementType > & | LoopVidsToOverlayElements, |
| const TDynamicMeshOverlay< StorageType, ElementSize > & | Overlay | ||
| ) |
Given a map generated by GetLoopOverlayMap(), checks that the overlay elements pointed to by the map still exist in the overlay, and sets the ID to be invalid if not. This can be called after deleting the triangles inside a loop to update the generated map and remove any UV elements that no longer exist (because the vertex was on a UV seam).
If true, we did not completely succeed in extracting all loops
|
protected |
|
protected |
Resulting set of loops filled by Compute()
| const FDynamicMesh3* UE::Geometry::FMeshRegionBoundaryLoops::Mesh = nullptr |
Mesh we are finding loops on
|
protected |