UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TWrapAroundGridIndexer3< RealType > Struct Template Reference

#include <GridIndexing3.h>

Public Member Functions

 TWrapAroundGridIndexer3 ()
 
 TWrapAroundGridIndexer3 (RealType CellSize)
 
FVector3i ToGrid (const TVector< RealType > &P) const
 
void IterateAcrossBounds (const TVector< RealType > &RealMin, const TVector< RealType > &RealMax, TFunctionRef< bool(const FVector3i &Index)> ShouldContinue) const
 

Public Attributes

RealType CellSize
 

Detailed Description

template<typename RealType>
struct UE::Geometry::TWrapAroundGridIndexer3< RealType >

Converts real-valued coordinates to integer grid coordinates, wrapping around outside the representable integer range.

Lacks a conversion back from the integer vector since it maps to multiple ranges, but this is frequently not needed. Also requires use of a function to iterate over a range, to ensure proper overflow.

Constructor & Destructor Documentation

◆ TWrapAroundGridIndexer3() [1/2]

template<typename RealType >
UE::Geometry::TWrapAroundGridIndexer3< RealType >::TWrapAroundGridIndexer3 ( )
inline

◆ TWrapAroundGridIndexer3() [2/2]

template<typename RealType >
UE::Geometry::TWrapAroundGridIndexer3< RealType >::TWrapAroundGridIndexer3 ( RealType  CellSize)
inline

Member Function Documentation

◆ IterateAcrossBounds()

template<typename RealType >
void UE::Geometry::TWrapAroundGridIndexer3< RealType >::IterateAcrossBounds ( const TVector< RealType > &  RealMin,
const TVector< RealType > &  RealMax,
TFunctionRef< bool(const FVector3i &Index)>  ShouldContinue 
) const
inline

Iterate across a range of indices going from the one that corresponds to RealMean to one that corresponds to RealMax. Iteration stops early if the passed function returns false.

◆ ToGrid()

template<typename RealType >
FVector3i UE::Geometry::TWrapAroundGridIndexer3< RealType >::ToGrid ( const TVector< RealType > &  P) const
inline

Convert real-valued point to integer grid coordinates, wrapping around when P/CellSize falls outside the representable integer range.

Member Data Documentation

◆ CellSize

template<typename RealType >
RealType UE::Geometry::TWrapAroundGridIndexer3< RealType >::CellSize

Real-valued size of an integer grid cell


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