UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TIncrementalMeshDijkstra< PointSetType > Class Template Reference

#include <IncrementalMeshDijkstra.h>

Classes

struct  FSeedPoint
 

Public Member Functions

 TIncrementalMeshDijkstra (const PointSetType *PointSetIn)
 
void AddSeedPoints (const TArray< FSeedPoint > &SeedPointsIn)
 
int32 GetSeedExternalIDForPointSetID (int32 PointID)
 
int32 FindMaxGraphDistancePointID () const
 
bool HasDistance (int32 PointID) const
 
double GetDistance (int32 PointID) const
 
bool FindPathToNearestSeed (int32 PointID, TArray< int32 > &PathToSeedOut, int32 MaxLength=100000)
 

Static Public Member Functions

static double InvalidDistance ()
 

Public Attributes

const PointSetTypePointSet
 
TUniqueFunction< FVector3d(int32)> GetPositionFunc
 

Detailed Description

template<class PointSetType>
class UE::Geometry::TIncrementalMeshDijkstra< PointSetType >

TIncrementalMeshDijkstra computes graph distances on a mesh from seed point(s) using Dijkstra's algorithm. Derived from TMeshDijkstra. This Incremental variant allows adding new Seed points to an already-computed solution.

Constructor & Destructor Documentation

◆ TIncrementalMeshDijkstra()

template<class PointSetType >
UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::TIncrementalMeshDijkstra ( const PointSetType PointSetIn)
inline

Construct TMeshDijkstra for the given PointSet. We will hold a reference to this PointSet for the lifetime of the class.

Member Function Documentation

◆ AddSeedPoints()

template<class PointSetType >
void UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::AddSeedPoints ( const TArray< FSeedPoint > &  SeedPointsIn)
inline

Add new SeedPoints to the current solution, and then propagate updated graph distances to any points closer to these new seed points than to existing seed points.

◆ FindMaxGraphDistancePointID()

template<class PointSetType >
int32 UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::FindMaxGraphDistancePointID ( ) const
inline
Returns
vertex id associated with the maximum graph distance returned by GetMaxGraphDistance()

◆ FindPathToNearestSeed()

template<class PointSetType >
bool UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::FindPathToNearestSeed ( int32  PointID,
TArray< int32 > &  PathToSeedOut,
int32  MaxLength = 100000 
)
inline

Find path from a point to the nearest seed point

Parameters
PointIDstarting point, assumption is that we have computed dijkstra to this point
PathToSeedOutpath is returned here, includes PointID and seed point as last element
MaxLengthif PathToSeedOut grows beyond this length, we abort the search
Returns
true if valid path was found

◆ GetDistance()

template<class PointSetType >
double UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::GetDistance ( int32  PointID) const
inline
Returns
the distance calculated for index PointID

◆ GetSeedExternalIDForPointSetID()

template<class PointSetType >
int32 UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::GetSeedExternalIDForPointSetID ( int32  PointID)
inline
Returns
the ExternalID of the SeedPoint that is closest to PointID, or -1 if PointID does not have a valid graph distance

◆ HasDistance()

template<class PointSetType >
bool UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::HasDistance ( int32  PointID) const
inline
Returns
true if the distance for index PointID was calculated

◆ InvalidDistance()

template<class PointSetType >
static double UE::Geometry::TIncrementalMeshDijkstra< PointSetType >::InvalidDistance ( )
inlinestatic

Member Data Documentation

◆ GetPositionFunc

Return the 3D Position of a given Point in the PointSet. This function is set to PointSet->GetVertex() in the constructor below, but can be replaced with an external function if necessary (eg to provide deformed mesh positions, etc)

◆ PointSet

PointSet we are calculating on


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