UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WorldPartitionRuntimeCellDataSpatialHash.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
6#include "WorldPartitionRuntimeCellDataSpatialHash.generated.h"
7
10
11UCLASS(Within = WorldPartitionRuntimeCell, MinimalAPI)
13{
15
16 //~Begin UWorldPartitionRuntimeCellData
17 ENGINE_API virtual void ResetStreamingSourceInfo(const FWorldPartitionStreamingContext& Context) const override;
18 UE_DEPRECATED(5.6, "Use version that takes a boolean to flag if the cell blocks on slow loading (bBlockOnSlowLoading).")
20 ENGINE_API virtual void AppendStreamingSourceInfo(const FWorldPartitionStreamingSource& Source, const FSphericalSector& SourceShape, const FWorldPartitionStreamingContext& Context, bool bBlockOnSlowLoading) const override;
21 ENGINE_API virtual void MergeStreamingSourceInfo() const override;
23 ENGINE_API virtual FBox GetCellBounds() const override;
24 ENGINE_API virtual FBox GetStreamingBounds() const override;
25 ENGINE_API virtual bool IsDebugShown() const override;
26 //~End UWorldPartitionRuntimeCellData
27
28 UPROPERTY()
30
31 UPROPERTY()
32 float Extent;
33
34private:
35 float ComputeSourceToCellAngleFactor(const FSphericalSector& SourceShape) const;
36
37 // Modulated distance to the different streaming sources used to sort relative priority amongst streaming cells
38 // The value is affected by :
39 // - All sources intersecting the cell
40 // - The priority of each source
41 // - The distance between the cell and each source
42 // - The angle between the cell and each source orientation
43 mutable double CachedSourceSortingDistance;
44
45 // Source Priorities
46 mutable TArray<float> CachedSourcePriorityWeights;
47
48 // Square distance from the cell to the intersecting streaming sources
49 mutable TArray<double> CachedSourceSquaredDistances;
50
51 // Intersecting streaming source shapes
52 mutable TArray<FSphericalSector> CachedInstersectingShapes;
53
54 // 2D version of CachedMinBlockOnSlowStreamingRatio
55 mutable double CachedMinBlockOnSlowStreamingRatio2D;
56
57 // 2D version of CachedMinSquareDistanceToBlockingSource
58 mutable double CachedMinSquareDistanceToBlockingSource2D;
59
60 // 2D version of CachedMinSlowStreamingRatio
61 mutable double CachedMinSlowStreamingRatio2D;
62
63 // 2D version of CachedMinSquareDistanceToSource
64 mutable double CachedMinSquareDistanceToSource2D;
65};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition WorldPartitionStreamingSource.h:11
Definition Array.h:670
Definition Level.h:75
Definition WorldPartitionRuntimeCellDataSpatialHash.h:13
Definition WorldPartitionRuntimeCellData.h:16
Definition WorldPartitionRuntimeCell.h:236
ENGINE_API int32 SortCompare(const UWorldPartitionRuntimeCell *Other) const
Definition WorldPartitionRuntimeCell.cpp:127
void AppendStreamingSourceInfo(const FWorldPartitionStreamingSource &Source, const FSphericalSector &SourceShape, const FWorldPartitionStreamingContext &Context) const
Definition WorldPartitionRuntimeCell.h:443
void MergeStreamingSourceInfo() const
Definition WorldPartitionRuntimeCell.h:444
virtual ENGINE_API bool IsDebugShown() const
Definition WorldPartitionRuntimeCell.cpp:132
FBox GetCellBounds() const
Definition WorldPartitionRuntimeCell.h:451
FBox GetStreamingBounds() const
Definition WorldPartitionRuntimeCell.h:454
Definition WorldPartitionRuntimeHash.h:166
Definition WorldPartitionStreamingSource.h:344