50 if (
ensureMsgf(
Index >= 0,
TEXT(
"World Partition reached the current limit of large world coordinates.")))
234 const double SquareDistance = InSphere.W * InSphere.W;
274 Algo::TransformIf(
InDataLayers, DataLayers, [](
const UDataLayerInstance* DataLayer) {
return DataLayer->IsRuntime(); }, [](
const UDataLayerInstance* DataLayer) {
return DataLayer; });
281 bool HasDataLayers()
const {
return !DataLayers.
IsEmpty(); }
284 FGuid GetContentBundleID()
const {
return ContentBundleID; }
292 FGuid ContentBundleID;
396 UE_DEPRECATED(5.4,
"Use version with bUseAlignedGridLevels param")
485UE_DEPRECATED(5.4,
"Use version with bUseAlignedGridLevels param")
488UE_DEPRECATED(5.4, "Use version with Settings
param")
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define verify(expr)
Definition AssertionMacros.h:319
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
UE::Math::TBox2< double > FBox2D
Definition MathFwd.h:56
FInt64Vector3 FGridCellCoord
Definition WorldPartitionRuntimeSpatialHash.h:18
FInt64Vector2 FGridCellCoord2
Definition WorldPartitionRuntimeSpatialHash.h:19
Definition WorldPartitionStreamingSource.h:11
UE_REWRITE bool IsEmpty() const
Definition Array.h:1133
Definition AssetRegistryState.h:50
Definition UnrealString.h.inl:34
void TransformIf(const InT &Input, OutT &&Output, PredicateT Predicate, TransformT Trans)
Definition Transform.h:47
U16 Index
Definition radfft.cpp:71
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition WorldPartitionRuntimeSpatialHash.h:233
Definition WorldPartitionRuntimeSpatialHash.h:37
Definition RuntimeSpatialHashGridHelper.h:29
int32 GetNumIntersectingCells(const FBox &InBox) const
Definition RuntimeSpatialHashGridHelper.h:168
bool GetCellIndex(const FGridCellCoord2 &InCoords, uint64 &OutIndex) const
Definition RuntimeSpatialHashGridHelper.h:138
bool GetCellBounds(int64 InIndex, FBox2D &OutBounds) const
Definition RuntimeSpatialHashGridHelper.h:63
bool GetCellBounds(const FGridCellCoord2 &InCoords, FBox2D &OutBounds, bool bCheckIsValidCoord=true) const
Definition RuntimeSpatialHashGridHelper.h:79
int32 ForEachIntersectingCells(const FBox &InBox, TFunctionRef< void(const FGridCellCoord2 &)> InOperation) const
Definition RuntimeSpatialHashGridHelper.h:218
int32 ForEachIntersectingCellsBreakable(const FBox &InBox, TFunctionRef< bool(const FGridCellCoord2 &)> InOperation) const
Definition RuntimeSpatialHashGridHelper.h:187
bool GetCellIndex(const FVector &InPos, uint64 &OutIndex) const
Definition RuntimeSpatialHashGridHelper.h:153
int32 ForEachIntersectingCells(const FSphere &InSphere, TFunctionRef< void(const FGridCellCoord2 &)> InOperation) const
Definition RuntimeSpatialHashGridHelper.h:228
int64 GridSize
Definition RuntimeSpatialHashGridHelper.h:32
bool GetCellCoords(const FVector2D &InPos, FGridCellCoord2 &OutCoords) const
Definition RuntimeSpatialHashGridHelper.h:97
bool GetCellCoords(const FBox2D &InBounds2D, FGridCellCoord2 &OutMinCellCoords, FGridCellCoord2 &OutMaxCellCoords) const
Definition RuntimeSpatialHashGridHelper.h:112
int64 CellSize
Definition RuntimeSpatialHashGridHelper.h:31
bool IsValidCoords(const FGridCellCoord2 &InCoords) const
Definition RuntimeSpatialHashGridHelper.h:45
FGrid2D(const FVector2D &InOrigin, int64 InCellSize, int64 InGridSize)
Definition RuntimeSpatialHashGridHelper.h:34
FVector2D Origin
Definition RuntimeSpatialHashGridHelper.h:30
Definition RuntimeSpatialHashGridHelper.h:297
FGridCellCoord GetCoords() const
Definition RuntimeSpatialHashGridHelper.h:328
FGridCell(const FGridCellCoord &InCoords)
Definition RuntimeSpatialHashGridHelper.h:298
Definition RuntimeSpatialHashGridHelper.h:268
int32 Level
Definition RuntimeSpatialHashGridHelper.h:391
FGridCell & GetCell(const FGridCellCoord2 &InCoords)
Definition RuntimeSpatialHashGridHelper.h:350
FGridLevel(const FVector2D &InOrigin, int64 InCellSize, int64 InGridSize, int32 InLevel)
Definition RuntimeSpatialHashGridHelper.h:340
TMap< int64, int64 > CellsMapping
Definition RuntimeSpatialHashGridHelper.h:393
const FGridCell & GetCell(const FGridCellCoord2 &InCoords) const
Definition RuntimeSpatialHashGridHelper.h:377
TArray< FGridCell > Cells
Definition RuntimeSpatialHashGridHelper.h:392
Definition RuntimeSpatialHashGridHelper.h:27
const FGridLevel::FGridCell & GetAlwaysLoadedCell() const
Definition RuntimeSpatialHashGridHelper.h:408
TArray< FGridLevel > Levels
Definition RuntimeSpatialHashGridHelper.h:477
ENGINE_API void ForEachCells(TFunctionRef< void(const FSquare2DGridHelper::FGridLevel::FGridCell &)> InOperation) const
Definition RuntimeSpatialHashGridHelper.cpp:98
bool GetCellGlobalCoords(const FGridCellCoord &InCoords, FGridCellCoord &OutGlobalCoords) const
Definition RuntimeSpatialHashGridHelper.h:432
FVector Origin
Definition RuntimeSpatialHashGridHelper.h:475
ENGINE_API int32 ForEachIntersectingCells(const FBox &InBox, TFunctionRef< void(const FGridCellCoord &)> InOperation, int32 InStartLevel=0) const
Definition RuntimeSpatialHashGridHelper.cpp:109
FBox WorldBounds
Definition RuntimeSpatialHashGridHelper.h:474
FGridLevel & GetLowestLevel()
Definition RuntimeSpatialHashGridHelper.h:402
bool GetCellBounds(const FGridCellCoord &InCoords, FBox2D &OutBounds) const
Definition RuntimeSpatialHashGridHelper.h:418
const FGridLevel::FGridCell & GetCell(const FGridCellCoord &InCoords) const
Definition RuntimeSpatialHashGridHelper.h:411
FGridLevel::FGridCell & GetAlwaysLoadedCell()
Definition RuntimeSpatialHashGridHelper.h:405
int64 CellSize
Definition RuntimeSpatialHashGridHelper.h:476
TVector2< T > Max
Definition Box2D.h:39
TVector2< T > Min
Definition Box2D.h:36
Definition IntVector.h:670
Definition IntVector.h:22
static UE_FORCEINLINE_HINT TVector2< double > Min(const TVector2< double > &A, const TVector2< double > &B)
Definition Vector2D.h:959
T Y
Definition Vector2D.h:52
static UE_FORCEINLINE_HINT TVector2< double > Max(const TVector2< double > &A, const TVector2< double > &B)
Definition Vector2D.h:953
T X
Definition Vector2D.h:49