26template<
typename CellType,
int Inval
idCellValue = 0>
283 return Cells[CellIndex];
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
@ INDEX_NONE
Definition CoreMiscDefines.h:150
@ ForceInitToZero
Definition CoreMiscDefines.h:156
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define FVector
Definition IOSSystemIncludes.h:8
UE::Math::TIntRect< int32 > FIntRect
Definition MathFwd.h:133
UE::Math::TBox< double > FBox
Definition MathFwd.h:55
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
FInt32Vector3 FIntVector
Definition MathFwd.h:115
UE::Math::TBox2< double > FBox2D
Definition MathFwd.h:56
#define MAX_uint32
Definition NumericLimits.h:21
Definition Archive.h:1208
virtual void Serialize(void *V, int64 Length)
Definition Archive.h:1689
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void Reset(SizeType NewSize=0)
Definition Array.h:2246
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
SizeType AddDefaulted()
Definition Array.h:2795
typename InAllocatorType::SizeType SizeType
Definition Array.h:675
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
UE_NODEBUG UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition Array.h:1122
SizeType AddZeroed()
Definition Array.h:2755
UE_NODEBUG UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize(void) const
Definition Array.h:1059
void Empty(SizeType Slack=0)
Definition Array.h:2273
Definition SimpleCellGrid.h:10
FGridSize2D(uint32 InWidth=0, uint32 InHeight=0)
Definition SimpleCellGrid.h:14
uint32 Width
Definition SimpleCellGrid.h:11
bool operator==(const FGridSize2D &Other) const
Definition SimpleCellGrid.h:19
uint32 Height
Definition SimpleCellGrid.h:12
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition NumericLimits.h:41
Definition SimpleCellGrid.h:28
const FCellType & operator[](int32 CellIndex) const
Definition SimpleCellGrid.h:294
int32 Num() const
Definition SimpleCellGrid.h:307
FCellType & GetCellAtIndexUnsafe(int32 CellIndex)
Definition SimpleCellGrid.h:296
FVector GetWorldCellCenter(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:275
bool IsValidCoord(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:131
void UpdateWorldBounds()
Definition SimpleCellGrid.h:116
FVector BoundsSize
Definition SimpleCellGrid.h:34
FBox2D GetWorldCellBox2D(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:234
int32 GetCellIndex(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:206
TSimpleCellGrid()
Definition SimpleCellGrid.h:41
const FCellType & GetCellAtIndexUnsafe(int32 CellIndex) const
Definition SimpleCellGrid.h:297
FIntRect GetGridRectangle() const
Definition SimpleCellGrid.h:265
FVector GetWorldCellCenter(int32 CellIndex) const
Definition SimpleCellGrid.h:270
int32 GetCellIndexUnsafe(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:194
void Serialize(FArchive &Ar)
Definition SimpleCellGrid.h:312
bool IsValid() const
Definition SimpleCellGrid.h:121
bool Init(const float InCellSize, const FGridSize2D &InGridSize, const FVector &InOrigin, const float VerticalBoundSize)
Definition SimpleCellGrid.h:84
FIntVector GetCellCoords(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:156
int32 GetCellCoordY(int32 CellIndex) const
Definition SimpleCellGrid.h:169
FCellType & GetCellAtCoordsUnsafe(int32 LocationX, int32 LocationY)
Definition SimpleCellGrid.h:299
FBox GetWorldCellRectangleBox(const FIntRect &CellRect) const
Definition SimpleCellGrid.h:243
const FCellType & GetCellAtWorldLocationUnsafe(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:280
int32 GetCellsCount() const
Definition SimpleCellGrid.h:302
void CleanUp()
Definition SimpleCellGrid.h:381
void Zero()
Definition SimpleCellGrid.h:375
bool IsValidCoord(const FIntVector &CellCoords) const
Definition SimpleCellGrid.h:136
FVector Origin
Definition SimpleCellGrid.h:33
int32 GetCellIndex(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:200
float GridCellSize
Definition SimpleCellGrid.h:31
FBox GetWorldCellBox(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:219
FBox GetWorldCellBox(int32 CellIndex) const
Definition SimpleCellGrid.h:213
const FCellType & GetCellAtCoordsUnsafe(int32 LocationX, int32 LocationY) const
Definition SimpleCellGrid.h:300
TArray< FCellType > Cells
Definition SimpleCellGrid.h:38
FGridSize2D GridSize
Definition SimpleCellGrid.h:35
uint32 GetAllocatedSize() const
Definition SimpleCellGrid.h:141
int32 GetCellIndexUnsafe(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:181
int32 GetCellIndexUnsafe(const FIntVector &CellCoords) const
Definition SimpleCellGrid.h:188
FBox2D GetWorldCellBox2D(int32 CellIndex) const
Definition SimpleCellGrid.h:228
FIntRect GetCellRectangleFromBox(const FBox &WorldBox) const
Definition SimpleCellGrid.h:252
bool Init(const float InCellSize, const FBox &Bounds)
Definition SimpleCellGrid.h:54
CellType FCellType
Definition SimpleCellGrid.h:29
void FreeMemory()
Definition SimpleCellGrid.h:370
FBox WorldBounds
Definition SimpleCellGrid.h:32
FIntVector GetCellCoordsUnsafe(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:147
const FCellType & GetCellAtWorldLocation(const FVector &WorldLocation) const
Definition SimpleCellGrid.h:286
void AllocateMemory()
Definition SimpleCellGrid.h:365
void SetVerticalInterval(const FFloatInterval &VerticalInterval)
Definition SimpleCellGrid.h:106
FIntVector GetCellCoords(int32 CellIndex) const
Definition SimpleCellGrid.h:175
bool IsValidIndex(const int32 CellIndex) const
Definition SimpleCellGrid.h:126
int32 GetCellCoordX(int32 CellIndex) const
Definition SimpleCellGrid.h:163
FCellType & operator[](int32 CellIndex)
Definition SimpleCellGrid.h:293
uint8 IsValid
Definition Box.h:45
TVector< T > GetSize() const
Definition Box.h:420
TVector< T > Min
Definition Box.h:39
TVector< T > Max
Definition Box.h:42
T Z
Definition Vector.h:68
T Y
Definition Vector.h:65
T X
Definition Vector.h:62