UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FEdgeLoop Class Reference

#include <EdgeLoop.h>

Public Member Functions

 FEdgeLoop ()
 
 FEdgeLoop (const FDynamicMesh3 *mesh)
 
 FEdgeLoop (const FDynamicMesh3 *mesh, const TArray< int > &vertices, const TArray< int > &edges)
 
GEOMETRYCORE_API void Initialize (const FDynamicMesh3 *mesh, const TArray< int > &vertices, const TArray< int > &edges, const TArray< int > *BowtieVerticesIn=nullptr)
 
GEOMETRYCORE_API void InitializeFromEdges (const TArray< int > &EdgesIn)
 
void InitializeFromEdges (const FDynamicMesh3 *MeshIn, const TArray< int > &EdgesIn)
 
GEOMETRYCORE_API bool InitializeFromVertices (const TArray< int > &VerticesIn, bool bAutoOrient=true)
 
bool InitializeFromVertices (const FDynamicMesh3 *MeshIn, const TArray< int > &VerticesIn, bool bAutoOrient=true)
 
void SetBowtieVertices (const TArray< int > &Bowties)
 
GEOMETRYCORE_API void CalculateBowtieVertices ()
 
int GetVertexCount () const
 
int GetEdgeCount () const
 
FVector3d GetVertex (int LoopIndex) const
 
FVector3d GetPrevVertex (int32 LoopIndex) const
 
FVector3d GetNextVertex (int32 LoopIndex) const
 
GEOMETRYCORE_API FAxisAlignedBox3d GetBounds () const
 
template<typename VecType >
void GetVertices (TArray< VecType > &VerticesOut) const
 
GEOMETRYCORE_API bool SetCorrectOrientation ()
 
void Reverse ()
 
GEOMETRYCORE_API bool IsInternalLoop () const
 
GEOMETRYCORE_API bool IsBoundaryLoop (const FDynamicMesh3 *TestMesh=nullptr) const
 
GEOMETRYCORE_API int FindVertexIndex (int VertexID) const
 
GEOMETRYCORE_API int FindNearestVertexIndex (const FVector3d &QueryPoint) const
 
GEOMETRYCORE_API bool CheckValidity (EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check) const
 

Static Public Member Functions

static GEOMETRYCORE_API void VertexLoopToEdgeLoop (const FDynamicMesh3 *Mesh, const TArray< int > &VertexLoop, TArray< int > &OutEdgeLoop)
 

Public Attributes

const FDynamicMesh3Mesh
 
TArray< int > Vertices
 
TArray< int > Edges
 
TArray< int > BowtieVertices
 
bool bBowtiesCalculated = false
 

Detailed Description

Sequential lists of vertices/edges in a mesh that form a closed loop

Constructor & Destructor Documentation

◆ FEdgeLoop() [1/3]

UE::Geometry::FEdgeLoop::FEdgeLoop ( )
inline

◆ FEdgeLoop() [2/3]

UE::Geometry::FEdgeLoop::FEdgeLoop ( const FDynamicMesh3 mesh)
inline

◆ FEdgeLoop() [3/3]

UE::Geometry::FEdgeLoop::FEdgeLoop ( const FDynamicMesh3 mesh,
const TArray< int > &  vertices,
const TArray< int > &  edges 
)
inline

Initialize EdgeLoop with the given vertices and edges

Member Function Documentation

◆ CalculateBowtieVertices()

void FEdgeLoop::CalculateBowtieVertices ( )

Populate the BowtieVertices member

◆ CheckValidity()

bool FEdgeLoop::CheckValidity ( EValidityCheckFailMode  FailMode = EValidityCheckFailMode::Check) const

Exhaustively check that verts and edges of this EdgeLoop are consistent. This is quite expensive.

Returns
true if loop is consistent/valid

◆ FindNearestVertexIndex()

int FEdgeLoop::FindNearestVertexIndex ( const FVector3d QueryPoint) const
Returns
index of vertex in the Vertices list that is closest to QueryPoint

◆ FindVertexIndex()

int FEdgeLoop::FindVertexIndex ( int  VertexID) const
Returns
index of VertexID in the Vertices list, or -1 if not found

◆ GetBounds()

FAxisAlignedBox3d FEdgeLoop::GetBounds ( ) const
Returns
bounding box of the vertices of the EdgeLoop

◆ GetEdgeCount()

int UE::Geometry::FEdgeLoop::GetEdgeCount ( ) const
inline
Returns
number of edges in the loop

◆ GetNextVertex()

FVector3d UE::Geometry::FEdgeLoop::GetNextVertex ( int32  LoopIndex) const
inline
Returns
vertex position in loop at the vertex after LoopIndex

◆ GetPrevVertex()

FVector3d UE::Geometry::FEdgeLoop::GetPrevVertex ( int32  LoopIndex) const
inline
Returns
vertex position in loop at the vertex previous to LoopIndex

◆ GetVertex()

FVector3d UE::Geometry::FEdgeLoop::GetVertex ( int  LoopIndex) const
inline
Returns
vertex position in loop at the given LoopIndex

◆ GetVertexCount()

int UE::Geometry::FEdgeLoop::GetVertexCount ( ) const
inline
Returns
number of vertices in the loop

◆ GetVertices()

template<typename VecType >
void UE::Geometry::FEdgeLoop::GetVertices ( TArray< VecType > &  VerticesOut) const
inline

Add the vertices of the loop to the Vertices array

◆ Initialize()

void FEdgeLoop::Initialize ( const FDynamicMesh3 mesh,
const TArray< int > &  vertices,
const TArray< int > &  edges,
const TArray< int > *  BowtieVerticesIn = nullptr 
)

Initialize the loop data

◆ InitializeFromEdges() [1/2]

void UE::Geometry::FEdgeLoop::InitializeFromEdges ( const FDynamicMesh3 MeshIn,
const TArray< int > &  EdgesIn 
)
inline

Construct an FEdgeLoop from a list of edges of the mesh

Parameters
MeshInthe mesh the edges exist on
EdgesInlist of sequential connected edges

◆ InitializeFromEdges() [2/2]

void FEdgeLoop::InitializeFromEdges ( const TArray< int > &  EdgesIn)

Construct an FEdgeLoop from a list of edges of the mesh

Parameters
EdgesInlist of sequential connected edges

◆ InitializeFromVertices() [1/2]

bool UE::Geometry::FEdgeLoop::InitializeFromVertices ( const FDynamicMesh3 MeshIn,
const TArray< int > &  VerticesIn,
bool  bAutoOrient = true 
)
inline

Construct EdgeLoop from list of vertices of mesh

Parameters
MeshInMesh that contains the loop
VerticesInlist of vertices that are sequentially connected by edges
bAutoOrientif true, and any of the edges are boundary edges, we will re-orient the loop to be consistent with boundary edges
Returns
false if we found any parts of vertices that are not connected by an edge

◆ InitializeFromVertices() [2/2]

bool FEdgeLoop::InitializeFromVertices ( const TArray< int > &  VerticesIn,
bool  bAutoOrient = true 
)

Construct EdgeLoop from list of vertices of mesh

Parameters
VerticesInlist of vertices that are sequentially connected by edges
bAutoOrientif true, and any of the edges are boundary edges, we will re-orient the loop to be consistent with boundary edges
Returns
false if we found any parts of vertices that are not connected by an edge

◆ IsBoundaryLoop()

bool FEdgeLoop::IsBoundaryLoop ( const FDynamicMesh3 TestMesh = nullptr) const
Parameters
TestMeshuse this mesh instead of the internal Mesh pointer
Returns
true if all edges of this loop are boundary edges

◆ IsInternalLoop()

bool FEdgeLoop::IsInternalLoop ( ) const
Returns
true if all edges of this loop are internal edges, ie not on the mesh boundary

◆ Reverse()

void UE::Geometry::FEdgeLoop::Reverse ( )
inline

Reverse order of vertices and edges in loop

◆ SetBowtieVertices()

void UE::Geometry::FEdgeLoop::SetBowtieVertices ( const TArray< int > &  Bowties)
inline

Set the bowtie vertices

◆ SetCorrectOrientation()

bool FEdgeLoop::SetCorrectOrientation ( )

If any edges if the loop are on a mesh boundary, we can check that the loop is oriented such that it corresponds with the boundary edges, and if not, reverse it.

Returns
true if the loop was reversed

◆ VertexLoopToEdgeLoop()

void FEdgeLoop::VertexLoopToEdgeLoop ( const FDynamicMesh3 Mesh,
const TArray< int > &  VertexLoop,
TArray< int > &  OutEdgeLoop 
)
static

Utility function to convert a vertex loop to an edge loop

Parameters
Meshmesh to operate on
VertexLoopordered list of vertices
OutEdgeLoopcomputed list of sequential connected vertices

Member Data Documentation

◆ bBowtiesCalculated

bool UE::Geometry::FEdgeLoop::bBowtiesCalculated = false

If true, then BowtieVertices list is valid

◆ BowtieVertices

TArray<int> UE::Geometry::FEdgeLoop::BowtieVertices

List of bowtie vertices. This list is only valid if bBowtiesCalculated = true.

◆ Edges

TArray<int> UE::Geometry::FEdgeLoop::Edges

Ordered list of edges forming the EdgeLoop

◆ Mesh

const FDynamicMesh3* UE::Geometry::FEdgeLoop::Mesh

The Mesh that contains this EdgeLoop

◆ Vertices

TArray<int> UE::Geometry::FEdgeLoop::Vertices

Ordered list of vertices forming the EdgeLoop


The documentation for this class was generated from the following files: