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

#include <DenseGrid2.h>

Public Member Functions

 TDenseGrid2 ()
 
 TDenseGrid2 (int32 DimX, int32 DimY, ElemType InitialValue)
 
int64 Size () const
 
int64 Width () const
 
int64 Height () const
 
FVector2i GetDimensions () const
 
void Resize (int32 DimX, int32 DimY, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
 
FORCEINLINE void Resize (int32 DimX, int32 DimY, bool bAllowShrinking)
 
void AssignAll (ElemType Value)
 
void SetMin (const FVector2i &IJK, ElemType NewValue)
 
void SetMax (const FVector2i &IJK, ElemType NewValue)
 
constexpr ElemType & operator[] (int64 Idx)
 
constexpr const ElemType & operator[] (int64 Idx) const
 
constexpr ElemType & operator[] (FVector2i Idx)
 
constexpr const ElemType & operator[] (FVector2i Idx) const
 
constexpr ElemType & At (int32 X, int32 Y)
 
constexpr const ElemType & At (int32 X, int32 Y) const
 
constexpr ElemType & At (int64 X, int64 Y)
 
constexpr const ElemType & At (int64 X, int64 Y) const
 
TArray64< ElemType > & GridValues ()
 
const TArray64< ElemType > & GridValues () const
 
void GetXPair (int32 X0, int32 Y, ElemType &AOut, ElemType &BOut) const
 
void Apply (TFunctionRef< ElemType(ElemType)> ApplyFunc)
 
FAxisAlignedBox2i Bounds () const
 
FAxisAlignedBox2i BoundsInclusive () const
 
FVector2i GetCoords (int64 LinearIndex) const
 
int64 GetIndex (int32 X, int32 Y) const
 
int64 GetIndex (const FVector2i &IJK) const
 

Protected Attributes

TArray64< ElemType > Buffer
 
int64 DimensionX
 
int64 DimensionY
 

Detailed Description

template<typename ElemType>
class UE::Geometry::TDenseGrid2< ElemType >

2D dense grid of scalar values.

Constructor & Destructor Documentation

◆ TDenseGrid2() [1/2]

template<typename ElemType >
UE::Geometry::TDenseGrid2< ElemType >::TDenseGrid2 ( )
inline

Create empty grid

◆ TDenseGrid2() [2/2]

template<typename ElemType >
UE::Geometry::TDenseGrid2< ElemType >::TDenseGrid2 ( int32  DimX,
int32  DimY,
ElemType  InitialValue 
)
inline

Member Function Documentation

◆ Apply()

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::Apply ( TFunctionRef< ElemType(ElemType)>  ApplyFunc)
inline

◆ AssignAll()

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::AssignAll ( ElemType  Value)
inline

◆ At() [1/4]

template<typename ElemType >
constexpr ElemType & UE::Geometry::TDenseGrid2< ElemType >::At ( int32  X,
int32  Y 
)
inlineconstexpr

◆ At() [2/4]

template<typename ElemType >
constexpr const ElemType & UE::Geometry::TDenseGrid2< ElemType >::At ( int32  X,
int32  Y 
) const
inlineconstexpr

◆ At() [3/4]

template<typename ElemType >
constexpr ElemType & UE::Geometry::TDenseGrid2< ElemType >::At ( int64  X,
int64  Y 
)
inlineconstexpr

◆ At() [4/4]

template<typename ElemType >
constexpr const ElemType & UE::Geometry::TDenseGrid2< ElemType >::At ( int64  X,
int64  Y 
) const
inlineconstexpr

◆ Bounds()

template<typename ElemType >
FAxisAlignedBox2i UE::Geometry::TDenseGrid2< ElemType >::Bounds ( ) const
inline

◆ BoundsInclusive()

template<typename ElemType >
FAxisAlignedBox2i UE::Geometry::TDenseGrid2< ElemType >::BoundsInclusive ( ) const
inline

◆ GetCoords()

template<typename ElemType >
FVector2i UE::Geometry::TDenseGrid2< ElemType >::GetCoords ( int64  LinearIndex) const
inline

◆ GetDimensions()

template<typename ElemType >
FVector2i UE::Geometry::TDenseGrid2< ElemType >::GetDimensions ( ) const
inline

◆ GetIndex() [1/2]

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::GetIndex ( const FVector2i IJK) const
inline

◆ GetIndex() [2/2]

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::GetIndex ( int32  X,
int32  Y 
) const
inline

◆ GetXPair()

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::GetXPair ( int32  X0,
int32  Y,
ElemType &  AOut,
ElemType &  BOut 
) const
inline

◆ GridValues() [1/2]

template<typename ElemType >
TArray64< ElemType > & UE::Geometry::TDenseGrid2< ElemType >::GridValues ( )
inline

◆ GridValues() [2/2]

template<typename ElemType >
const TArray64< ElemType > & UE::Geometry::TDenseGrid2< ElemType >::GridValues ( ) const
inline

◆ Height()

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::Height ( ) const
inline

◆ operator[]() [1/4]

template<typename ElemType >
constexpr ElemType & UE::Geometry::TDenseGrid2< ElemType >::operator[] ( FVector2i  Idx)
inlineconstexpr

◆ operator[]() [2/4]

template<typename ElemType >
constexpr const ElemType & UE::Geometry::TDenseGrid2< ElemType >::operator[] ( FVector2i  Idx) const
inlineconstexpr

◆ operator[]() [3/4]

template<typename ElemType >
constexpr ElemType & UE::Geometry::TDenseGrid2< ElemType >::operator[] ( int64  Idx)
inlineconstexpr

◆ operator[]() [4/4]

template<typename ElemType >
constexpr const ElemType & UE::Geometry::TDenseGrid2< ElemType >::operator[] ( int64  Idx) const
inlineconstexpr

◆ Resize() [1/2]

template<typename ElemType >
FORCEINLINE void UE::Geometry::TDenseGrid2< ElemType >::Resize ( int32  DimX,
int32  DimY,
bool  bAllowShrinking 
)
inline

◆ Resize() [2/2]

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::Resize ( int32  DimX,
int32  DimY,
EAllowShrinking  AllowShrinking = EAllowShrinking::Default 
)
inline

◆ SetMax()

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::SetMax ( const FVector2i IJK,
ElemType  NewValue 
)
inline

◆ SetMin()

template<typename ElemType >
void UE::Geometry::TDenseGrid2< ElemType >::SetMin ( const FVector2i IJK,
ElemType  NewValue 
)
inline

◆ Size()

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::Size ( ) const
inline

◆ Width()

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::Width ( ) const
inline

Member Data Documentation

◆ Buffer

template<typename ElemType >
TArray64<ElemType> UE::Geometry::TDenseGrid2< ElemType >::Buffer
protected

grid of allocated elements

◆ DimensionX

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::DimensionX
protected

dimensions per axis

◆ DimensionY

template<typename ElemType >
int64 UE::Geometry::TDenseGrid2< ElemType >::DimensionY
protected

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