UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs > Class Template Reference

WITH_EDITOR. More...

#include <LandscapeUtilsPrivate.h>

Public Member Functions

 T2DIndexer (TConstArrayView< ValueType > InValues)
 
virtual ~T2DIndexer ()=default
 
 T2DIndexer (const T2DIndexer &Other)=default
 
 T2DIndexer (T2DIndexer &&Other)=default
 
T2DIndexeroperator= (const T2DIndexer &Other)=default
 
T2DIndexeroperator= (T2DIndexer &&Other)=default
 
bool IsValidKey (const FIntPoint &InKey) const
 
bool IsValidValueIndex (int32 InIndex) const
 
ValueType & GetValueForKey (const FIntPoint &InKey) const
 
ValueType & GetValueForKeySafe (const FIntPoint &InKey) const
 
ValueType & GetValueForKeyChecked (const FIntPoint &InKey) const
 
int32 GetValueIndexForKey (const FIntPoint &InKey) const
 
int32 GetValueIndexForKeySafe (const FIntPoint &InKey) const
 
int32 GetValueIndexForKeyChecked (const FIntPoint &InKey) const
 
FIntPoint GetValueKeyForIndex (int32 InIndex) const
 
FIntPoint GetValueKeyForIndexSafe (int32 InIndex) const
 
FIntPoint GetValueKeyForIndexChecked (int32 InIndex) const
 
int32 GetValueIndex (const ValueType &InValue) const
 
int32 GetValueIndexSafe (const ValueType &InValue) const
 
int32 GetValueIndexChecked (const ValueType &InValue) const
 
bool IsValidValue (const FIntPoint &InKey) const
 
bool IsValidValueSafe (const FIntPoint &InKey) const
 
bool IsValidValueChecked (const FIntPoint &InKey) const
 
bool HasValidValueInBounds (const FIntRect &InBounds, bool bInInclusiveBounds)
 
TBitArray GetValidValueBitIndicesInBounds (const FIntRect &InBounds, bool bInInclusiveBounds)
 
TArray< ValueType > GetValidValuesForBitIndices (const TBitArray<> &InBitIndices)
 
FIntRect GetValidValuesBoundsForBitIndices (const TBitArray<> &InBitIndices, bool bInInclusiveBounds)
 
TArray< ValueType > GetValidValues ()
 
const TArray< ValueType > & GetAllValues () const
 
const TBitArrayGetValidValueBitIndices () const
 

Detailed Description

template<typename ValueType, typename KeyFuncs>
class UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >

WITH_EDITOR.

Helper class to transform a list of values into a 2D array. This is a replacement for a TMap<FIntPoint, ValueType>, where FIntPoint is a 2D key and ValueType, the type of object to store. It uses bit arrays to note the presence of an object and the 2D key to index it. The advantage is that the key can trivially be turned into linear index (and vice-versa), derived from the bounds of all registered keys. It is meant to be used as a temporary helper, which is why there are currently no Add/Remove functions (all objects are registered in the constructor) but this could be done eventually, and even replace ULandscapeInfo's XYToComponentMap entirely

Constructor & Destructor Documentation

◆ T2DIndexer() [1/3]

template<typename ValueType , typename KeyFuncs >
UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::T2DIndexer ( TConstArrayView< ValueType >  InValues)
inline

◆ ~T2DIndexer()

template<typename ValueType , typename KeyFuncs >
virtual UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::~T2DIndexer ( )
virtualdefault

◆ T2DIndexer() [2/3]

template<typename ValueType , typename KeyFuncs >
UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::T2DIndexer ( const T2DIndexer< ValueType, KeyFuncs > &  Other)
default

◆ T2DIndexer() [3/3]

template<typename ValueType , typename KeyFuncs >
UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::T2DIndexer ( T2DIndexer< ValueType, KeyFuncs > &&  Other)
default

Member Function Documentation

◆ GetAllValues()

template<typename ValueType , typename KeyFuncs >
const TArray< ValueType > & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetAllValues ( ) const
inline

◆ GetValidValueBitIndices()

template<typename ValueType , typename KeyFuncs >
const TBitArray & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValidValueBitIndices ( ) const
inline

◆ GetValidValueBitIndicesInBounds()

template<typename ValueType , typename KeyFuncs >
TBitArray UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValidValueBitIndicesInBounds ( const FIntRect InBounds,
bool  bInInclusiveBounds 
)
inline

◆ GetValidValues()

template<typename ValueType , typename KeyFuncs >
TArray< ValueType > UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValidValues ( )
inline

◆ GetValidValuesBoundsForBitIndices()

template<typename ValueType , typename KeyFuncs >
FIntRect UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValidValuesBoundsForBitIndices ( const TBitArray<> &  InBitIndices,
bool  bInInclusiveBounds 
)
inline

◆ GetValidValuesForBitIndices()

template<typename ValueType , typename KeyFuncs >
TArray< ValueType > UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValidValuesForBitIndices ( const TBitArray<> &  InBitIndices)
inline

◆ GetValueForKey()

template<typename ValueType , typename KeyFuncs >
ValueType & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueForKey ( const FIntPoint InKey) const
inline

◆ GetValueForKeyChecked()

template<typename ValueType , typename KeyFuncs >
ValueType & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueForKeyChecked ( const FIntPoint InKey) const
inline

◆ GetValueForKeySafe()

template<typename ValueType , typename KeyFuncs >
ValueType & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueForKeySafe ( const FIntPoint InKey) const
inline

◆ GetValueIndex()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndex ( const ValueType &  InValue) const
inline

◆ GetValueIndexChecked()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndexChecked ( const ValueType &  InValue) const
inline

◆ GetValueIndexForKey()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndexForKey ( const FIntPoint InKey) const
inline

◆ GetValueIndexForKeyChecked()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndexForKeyChecked ( const FIntPoint InKey) const
inline

◆ GetValueIndexForKeySafe()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndexForKeySafe ( const FIntPoint InKey) const
inline

◆ GetValueIndexSafe()

template<typename ValueType , typename KeyFuncs >
int32 UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueIndexSafe ( const ValueType &  InValue) const
inline

◆ GetValueKeyForIndex()

template<typename ValueType , typename KeyFuncs >
FIntPoint UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueKeyForIndex ( int32  InIndex) const
inline

◆ GetValueKeyForIndexChecked()

template<typename ValueType , typename KeyFuncs >
FIntPoint UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueKeyForIndexChecked ( int32  InIndex) const
inline

◆ GetValueKeyForIndexSafe()

template<typename ValueType , typename KeyFuncs >
FIntPoint UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::GetValueKeyForIndexSafe ( int32  InIndex) const
inline

◆ HasValidValueInBounds()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::HasValidValueInBounds ( const FIntRect InBounds,
bool  bInInclusiveBounds 
)
inline

◆ IsValidKey()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::IsValidKey ( const FIntPoint InKey) const
inline

◆ IsValidValue()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::IsValidValue ( const FIntPoint InKey) const
inline

◆ IsValidValueChecked()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::IsValidValueChecked ( const FIntPoint InKey) const
inline

◆ IsValidValueIndex()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::IsValidValueIndex ( int32  InIndex) const
inline

◆ IsValidValueSafe()

template<typename ValueType , typename KeyFuncs >
bool UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::IsValidValueSafe ( const FIntPoint InKey) const
inline

◆ operator=() [1/2]

template<typename ValueType , typename KeyFuncs >
T2DIndexer & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::operator= ( const T2DIndexer< ValueType, KeyFuncs > &  Other)
default

◆ operator=() [2/2]

template<typename ValueType , typename KeyFuncs >
T2DIndexer & UE::Landscape::Private::T2DIndexer< ValueType, KeyFuncs >::operator= ( T2DIndexer< ValueType, KeyFuncs > &&  Other)
default

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