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

#include <DynamicVerticesOctree3.h>

+ Inheritance diagram for UE::Geometry::TDynamicVerticesOctree3< SourceType >:

Public Member Functions

void Initialize (const SourceType *VertexSourceIn, bool bDynamicExpand)
 
void ResetModifiedBounds ()
 
void InsertVertex (int32 VertexID)
 
void InsertVertices (const TArray< int > &Vertices)
 
void InsertVertices (const TSet< int > &Vertices)
 
bool RemovePoint (int32 VertexID)
 
void RemoveVertices (const TArray< int > &Vertices)
 
void RemoveVertices (const TSet< int > &Vertices)
 
void ReinsertVertices (const TSet< int > &Vertices)
 
void NotifyPendingModification (int VertexID)
 
void NotifyPendingModification (const TSet< int > &Vertices)
 
int32 FindNearestHitVertex (const FRay3d &Ray, double MaxDistance=TNumericLimits< double >::Max()) const
 
void CheckValidity (EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check, bool bVerbose=false, bool bFailOnMissingPoints=false) const
 
- Public Member Functions inherited from UE::Geometry::FSparseDynamicPointOctree3
void ConfigureFromPointCountEstimate (double MaxBoundsDimension, int CountEstimate)
 
bool ContainsPoint (int32 PointID) const
 
void InsertPoint (int32 PointID, const FVector3d &Position)
 
void InsertPoint_DynamicExpand (int32 PointID, TFunctionRef< FVector3d(int)> GetPositionFunc)
 
void ParallelInsertDensePointSet (int32 MaxPointID, TFunctionRef< FVector3d(int)> GetPositionFunc)
 
bool RemovePoint (int32 PointID)
 
void RemovePointUnsafe (int32 PointID)
 
void ReinsertPoint (int32 PointID, const FVector3d &NewPosition)
 
int32 FindNearestHitPoint (const FRay3d &Ray, TFunctionRef< double(int, const FRay3d &)> HitPointDistFunc, double MaxDistance=TNumericLimits< double >::Max()) const
 
GEOMETRYCORE_API int32 FindClosestPoint (FVector3d QueryPt, double DistanceThreshold, TFunctionRef< bool(int32)> PredicateFunc, TFunctionRef< double(int32)> DistSqFunc, TArray< const FSparsePointOctreeCell * > *TempBuffer=nullptr) const
 
void FindKClosestPoints (FVector3d QueryPt, double DistanceThreshold, int32 NumToFind, TArray< TPair< int32, double > > &FoundPoints, TFunctionRef< bool(int32)> PredicateFunc, TFunctionRef< double(int32)> DistSqFunc, TArray< const FSparsePointOctreeCell * > *TempBuffer=nullptr) const
 
void RangeQuery (const FAxisAlignedBox3d &Bounds, TFunctionRef< bool(int)> PredicateFunc, TArray< int > &PointIDsOut, TArray< const FSparsePointOctreeCell * > *TempBuffer=nullptr) const
 
void ParallelRangeQuery (const FAxisAlignedBox3d &Bounds, TFunctionRef< bool(int)> PredicateFunc, TArray< int > &PointIDsOut, TArray< const FSparsePointOctreeCell * > *TempBuffer=nullptr) const
 
void CheckValidity (TFunctionRef< bool(int)> IsValidPointIDFunc, TFunctionRef< FVector3d(int)> GetPointFunc, EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check, bool bVerbose=false, bool bFailOnMissingPoints=false) const
 
void ComputeStatistics (FStatistics &StatsOut) const
 

Public Attributes

const SourceType * VertexSource
 
FAxisAlignedBox3d ModifiedBounds
 
double HitSphereRadius = 1.0f
 
- Public Attributes inherited from UE::Geometry::FSparseDynamicPointOctree3
double RootDimension = 1000.0
 
int MaxTreeDepth = 10
 
int MaxPointsPerCell = 1000
 

Additional Inherited Members

- Protected Member Functions inherited from UE::Geometry::FSparseDynamicPointOctree3
double GetCellWidth (uint32 Level) const
 
FAxisAlignedBox3d GetCellBox (uint32 Level, const FVector3i &Index) const
 
FAxisAlignedBox3d GetCellBox (const FSparsePointOctreeCell &Cell) const
 
FVector3d GetCellCenter (uint32 Level, const FVector3i &Index) const
 
FVector3d GetCellCenter (const FSparsePointOctreeCell &Cell) const
 
FVector3i PointToIndex (uint32 Level, const FVector3d &Position) const
 
int ToChildCellIndex (uint32 Level, const FVector3i &Index, const FVector3d &Position) const
 
int ToChildCellIndex (const FSparsePointOctreeCell &Cell, const FVector3d &Position) const
 
bool CellContains (const FSparsePointOctreeCell &Cell, const FVector3d &Position) const
 
uint32 GetCellForPoint (int32 PointID) const
 
FSparsePointOctreeCell FindCurrentContainingCell (const FVector3d &Position) const
 
uint32 CreateNewRootCell (FSparsePointOctreeCell NewRootCell, bool bInitializeCellPointList)
 
void Insert_NewRoot (int32 PointID, const FVector3d &Position, FSparsePointOctreeCell NewRootCell)
 
void Insert_ToCell (int32 PointID, const FVector3d &Position, const FSparsePointOctreeCell &ExistingCell)
 
void Insert_NewChildCell (int32 PointID, const FVector3d &Position, int ParentCellID, FSparsePointOctreeCell NewChildCell, int ChildIdx)
 
double FindNearestRayCellIntersection (const FSparsePointOctreeCell &Cell, const FRay3d &Ray) const
 
- Protected Attributes inherited from UE::Geometry::FSparseDynamicPointOctree3
FRefCountVector CellRefCounts
 
TDynamicVector< FSparsePointOctreeCellCells
 
TSparseListSet< int32CellPointLists
 
TDynamicVector< uint32PointIDToCellMap
 
TSparseGrid3< uint32RootCells
 
- Static Protected Attributes inherited from UE::Geometry::FSparseDynamicPointOctree3
static constexpr uint32 InvalidCellID = FSparsePointOctreeCell::InvalidID
 

Detailed Description

template<typename SourceType>
class UE::Geometry::TDynamicVerticesOctree3< SourceType >

TDynamicVerticesOctree3 is an extension of FSparseDynamicPointOctree3 for the vertices of a FDynamicXYZ3 instance (eg FDynamicMesh3, TDynamicPointSet3, FDynamicGraph, etc) This extension does several things: 1) provides a simplified API based on vertex IDs to various Octree functions 2) tracks ModifiedBounds box of modified areas

The template expansion requires that FDynamicXYZ3 has the following API: 1) a function int MaxVertexID() that returns the maximum vertex ID/index 2) a function bool IsVertex(int) that returns true if the index is valid 3) a function FVector3d GetVertex(int index) that returns the position of a vertex 4) a function FAxisAlignedBox3d GetBounds() that returns a bounding-box of the point set

Member Function Documentation

◆ CheckValidity()

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::CheckValidity ( EValidityCheckFailMode  FailMode = EValidityCheckFailMode::Check,
bool  bVerbose = false,
bool  bFailOnMissingPoints = false 
) const
inline

Check that the Octree is internally valid

◆ FindNearestHitVertex()

template<typename SourceType >
int32 UE::Geometry::TDynamicVerticesOctree3< SourceType >::FindNearestHitVertex ( const FRay3d Ray,
double  MaxDistance = TNumericLimits<double>::Max() 
) const
inline

Find the nearest triangle of the VertexSource that is hit by the ray

◆ Initialize()

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::Initialize ( const SourceType *  VertexSourceIn,
bool  bDynamicExpand 
)
inline

Add all vertices of MeshIn to the octree

◆ InsertVertex()

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::InsertVertex ( int32  VertexID)
inline

Insert a triangle into the tree

◆ InsertVertices() [1/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::InsertVertices ( const TArray< int > &  Vertices)
inline

Insert a list of vertices into the tree

◆ InsertVertices() [2/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::InsertVertices ( const TSet< int > &  Vertices)
inline

Insert a set of vertices into the tree

◆ NotifyPendingModification() [1/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::NotifyPendingModification ( const TSet< int > &  Vertices)
inline

Include the current bounds of a set of vertices in the ModifiedBounds box

◆ NotifyPendingModification() [2/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::NotifyPendingModification ( int  VertexID)
inline

Include the current bounds of a triangle in the ModifiedBounds box

◆ ReinsertVertices()

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::ReinsertVertices ( const TSet< int > &  Vertices)
inline

Reinsert a set of vertices into the tree

◆ RemovePoint()

template<typename SourceType >
bool UE::Geometry::TDynamicVerticesOctree3< SourceType >::RemovePoint ( int32  VertexID)
inline

Remove a triangle from the tree

◆ RemoveVertices() [1/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::RemoveVertices ( const TArray< int > &  Vertices)
inline

Remove a list of vertices from the tree

◆ RemoveVertices() [2/2]

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::RemoveVertices ( const TSet< int > &  Vertices)
inline

Remove a set of vertices from the tree

◆ ResetModifiedBounds()

template<typename SourceType >
void UE::Geometry::TDynamicVerticesOctree3< SourceType >::ResetModifiedBounds ( )
inline

Reset the internal ModifiedBounds box that tracks modified triangle bounds

Member Data Documentation

◆ HitSphereRadius

template<typename SourceType >
double UE::Geometry::TDynamicVerticesOctree3< SourceType >::HitSphereRadius = 1.0f

◆ ModifiedBounds

template<typename SourceType >
FAxisAlignedBox3d UE::Geometry::TDynamicVerticesOctree3< SourceType >::ModifiedBounds

bounding box of vertices that have been inserted/removed since last clear

◆ VertexSource

template<typename SourceType >
const SourceType* UE::Geometry::TDynamicVerticesOctree3< SourceType >::VertexSource

parent mesh


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