9class ULandscapeComponent;
35 template <
typename ValueType,
typename KeyFuncs>
45 AllKeys.AddDefaulted(NumValues);
61 int32 NumEntries = KeyExclusiveBounds.
Area();
63 ValidValueBitIndices.
Init(
false, NumEntries);
68 ValidValueBitIndices[ValueIndex] =
true;
122 const int32 Stride = KeyExclusiveBounds.
Width();
177 LocalBounds.
Clip(KeyExclusiveBounds);
178 if (LocalBounds.
Area() <= 0)
208 LocalBounds.
Clip(KeyExclusiveBounds);
209 if (LocalBounds.
Area() <= 0)
219 Result[ValueIndex] = ValidValueBitIndices[ValueIndex];
236 Result.Add(AllValues[It.GetIndex()]);
259 bool bIsValid =
false;
260 const int32 Stride = KeyExclusiveBounds.
Width();
293 Result.Add(AllValues[It.GetIndex()]);
@ YMax
Definition Aabb.h:10
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TIntRect< int32 > FIntRect
Definition MathFwd.h:133
FInt32Point FIntPoint
Definition MathFwd.h:124
#define MAX_int32
Definition NumericLimits.h:25
#define MIN_int32
Definition NumericLimits.h:16
UE_REWRITE SizeType Num() const
Definition Array.h:1144
SizeType AddDefaulted()
Definition Array.h:2795
UE_NODEBUG UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition Array.h:1122
UE_FORCEINLINE_HINT int32 Num() const
Definition BitArray.h:1466
int32 CountSetBits(int32 FromIndex=0, int32 ToIndex=INDEX_NONE) const
Definition BitArray.h:1378
UE_FORCEINLINE_HINT void Init(bool bValue, int32 InNumBits)
Definition BitArray.h:828
static TBitArray BitwiseAND(const TBitArray< AllocatorA > &A, const TBitArray< AllocatorB > &B, EBitwiseOperatorFlags InFlags)
Definition BitArray.h:1290
Definition BitArray.h:1944
WITH_EDITOR.
Definition LandscapeUtilsPrivate.h:37
bool IsValidValueIndex(int32 InIndex) const
Definition LandscapeUtilsPrivate.h:82
bool IsValidKey(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:77
virtual ~T2DIndexer()=default
T2DIndexer(T2DIndexer &&Other)=default
T2DIndexer(TConstArrayView< ValueType > InValues)
Definition LandscapeUtilsPrivate.h:39
T2DIndexer & operator=(const T2DIndexer &Other)=default
int32 GetValueIndex(const ValueType &InValue) const
Definition LandscapeUtilsPrivate.h:137
TArray< ValueType > GetValidValues()
Definition LandscapeUtilsPrivate.h:287
FIntPoint GetValueKeyForIndexSafe(int32 InIndex) const
Definition LandscapeUtilsPrivate.h:126
TBitArray GetValidValueBitIndicesInBounds(const FIntRect &InBounds, bool bInInclusiveBounds)
Definition LandscapeUtilsPrivate.h:197
bool HasValidValueInBounds(const FIntRect &InBounds, bool bInInclusiveBounds)
Definition LandscapeUtilsPrivate.h:168
int32 GetValueIndexChecked(const ValueType &InValue) const
Definition LandscapeUtilsPrivate.h:147
int32 GetValueIndexForKeySafe(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:109
bool IsValidValueSafe(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:157
T2DIndexer & operator=(T2DIndexer &&Other)=default
FIntRect GetValidValuesBoundsForBitIndices(const TBitArray<> &InBitIndices, bool bInInclusiveBounds)
Definition LandscapeUtilsPrivate.h:241
int32 GetValueIndexForKeyChecked(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:114
ValueType & GetValueForKeySafe(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:92
T2DIndexer(const T2DIndexer &Other)=default
int32 GetValueIndexForKey(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:103
FIntPoint GetValueKeyForIndexChecked(int32 InIndex) const
Definition LandscapeUtilsPrivate.h:131
const TArray< ValueType > & GetAllValues() const
Definition LandscapeUtilsPrivate.h:298
TArray< ValueType > GetValidValuesForBitIndices(const TBitArray<> &InBitIndices)
Definition LandscapeUtilsPrivate.h:226
bool IsValidValueChecked(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:162
bool IsValidValue(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:152
const TBitArray & GetValidValueBitIndices() const
Definition LandscapeUtilsPrivate.h:299
ValueType & GetValueForKeyChecked(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:97
int32 GetValueIndexSafe(const ValueType &InValue) const
Definition LandscapeUtilsPrivate.h:142
FIntPoint GetValueKeyForIndex(int32 InIndex) const
Definition LandscapeUtilsPrivate.h:120
ValueType & GetValueForKey(const FIntPoint &InKey) const
Definition LandscapeUtilsPrivate.h:87
CORE_API void Reserve(int32 CharacterCount)
Definition String.cpp.inl:307
Definition LandscapeInfo.h:109
Definition Landscape.cpp:3469
int32 BlitHeightChannelsToUint16(uint16 *DestBuffer, const FBlitBuffer2DDesc &Dest, uint32 *SrcBuffer, const FBlitBuffer2DDesc &Src, FIntRect ClipRect)
Definition LandscapeUtilsPrivate.cpp:160
int32 ComputeMipToMipMaxDeltasIndex(int32 InSourceMipIndex, int32 InDestinationMipIndex, int32 InNumRelevantMips)
Definition LandscapeUtilsPrivate.cpp:45
int32 ComputeMaxDeltasOffsetForMip(int32 InMipIndex, int32 InNumRelevantMips)
Definition LandscapeUtilsPrivate.cpp:30
int32 ComputeMipToMipMaxDeltasCount(int32 InNumRelevantMips)
Definition LandscapeUtilsPrivate.cpp:52
int32 ComputeMaxDeltasCountForMip(int32 InMipIndex, int32 InNumRelevantMips)
Definition LandscapeUtilsPrivate.cpp:40
int32 BlitWeightChannelsToUint8(uint8 *DestBuffer, const FBlitBuffer2DDesc &Dest, uint32 *SrcBuffer, const FBlitBuffer2DDesc &Src, FIntRect ClipRect)
Definition LandscapeUtilsPrivate.cpp:168
FLandscapeComponent2DIndexer CreateLandscapeComponent2DIndexer(const ULandscapeInfo *InInfo)
Definition LandscapeUtilsPrivate.cpp:107
U16 Index
Definition radfft.cpp:71
Definition LandscapeComponent.h:327
static constexpr UE_FORCEINLINE_HINT T DivideAndRoundDown(T Dividend, T Divisor)
Definition UnrealMathUtility.h:701
Definition LandscapeUtilsPrivate.h:317
int32 BufferSize
Definition LandscapeUtilsPrivate.h:318
int32 Stride
Definition LandscapeUtilsPrivate.h:319
FIntRect Rect
Definition LandscapeUtilsPrivate.h:320
Definition LandscapeUtilsPrivate.h:308
static FIntPoint GetKey(ULandscapeComponent *InComponent)
WITH_EDITOR.
Definition LandscapeUtilsPrivate.cpp:102
TIntPoint ComponentMax(const TIntPoint &Other) const
Definition IntPoint.h:343
IntType Y
Definition IntPoint.h:37
TIntPoint ComponentMin(const TIntPoint &Other) const
Definition IntPoint.h:333
static const TIntPoint NoneValue
Definition IntPoint.h:48
IntType X
Definition IntPoint.h:34
IntType Width() const
Definition IntRect.h:469
bool Contains(IntPointType P) const
Definition IntRect.h:338
IntPointType Max
Definition IntRect.h:37
IntPointType Min
Definition IntRect.h:34
void Clip(const TIntRect &R)
Definition IntRect.h:294
IntType Area() const
Definition IntRect.h:272