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

#include <PointSetHashTable.h>

Public Member Functions

 FPointSetHashtable (FPointSetAdapterd *PointSetIn)
 
GEOMETRYCORE_API void Build (double CellSize, const FVector3d &Origin)
 
GEOMETRYCORE_API bool FindPointsInBall (const FVector3d &QueryPt, double QueryRadius, TArray< int > &ResultOut)
 

Protected Types

typedef TArray< int > PointList
 

Protected Attributes

FPointSetAdapterdPoints
 
TSparseGrid3< PointListGrid
 
FShiftGridIndexer3d GridIndexer
 
FVector3d Origin
 
double CellSize
 

Detailed Description

FPointSetHashTable builds a spatial data structure that supports efficient range queries on a point set (in FPointSetAdapterd form). The spatial data structure is currently a uniform sparse 3D grid.

Member Typedef Documentation

◆ PointList

Constructor & Destructor Documentation

◆ FPointSetHashtable()

UE::Geometry::FPointSetHashtable::FPointSetHashtable ( FPointSetAdapterd PointSetIn)
inline

Member Function Documentation

◆ Build()

void FPointSetHashtable::Build ( double  CellSize,
const FVector3d Origin 
)

Construct the spatial data structure for the current point set

Parameters
CellSizethe size of the cells/voxels in the grid.
OriginWorld origin of the grid (not strictly necessary since grid is sparse, can set to origin for example)

◆ FindPointsInBall()

bool FPointSetHashtable::FindPointsInBall ( const FVector3d QueryPt,
double  QueryRadius,
TArray< int > &  ResultOut 
)

Find all points within given query distance from query point. Note that in current implementation the distance must be less than the CellSize used in construction, ie at most the directly adjacent neighbours next to the cell containing QueryPt can be searched

Parameters
QueryPtcenter of search sphere/ball
QueryRadiusradius of search sphere/ball. Points within this distance of QueryPt are returned.
ResultOutindices of discovered points are stored in this list
Returns
true on success

Member Data Documentation

◆ CellSize

double UE::Geometry::FPointSetHashtable::CellSize
protected

Cell size of grid

◆ Grid

TSparseGrid3<PointList> UE::Geometry::FPointSetHashtable::Grid
protected

Sparse grid, each voxel contains lists of contained points

◆ GridIndexer

FShiftGridIndexer3d UE::Geometry::FPointSetHashtable::GridIndexer
protected

index mapping object

◆ Origin

FVector3d UE::Geometry::FPointSetHashtable::Origin
protected

World origin of sparse grid

◆ Points

FPointSetAdapterd* UE::Geometry::FPointSetHashtable::Points
protected

Input point set


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