Navigation
API > API/Runtime > API/Runtime/GeometryCore
TBlockedDenseGrid adds thread-safe access functions to the 3D blocked uniform grid, TBasicBlockedDenseGrid3. Blocked grid is extended by adding internally owned locks for each data block.
The grid is allocated in BlockSize^3 blocks on-demand (BlockSize is a compile-time constant) allowing very large grids to be used without having to pre-allocate all the memory, eg for sparse/narrow-band use cases.
For multi-threaded applications where memory is a premium, consider using TBlockedGrid3 (above) as it gives better control over the individual blocks and allows the caller to manage the lifetime of any locks used.
| Name | TBlockedDenseGrid3 |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Spatial/BlockedDenseGrid3.h |
| Include Path | #include "Spatial/BlockedDenseGrid3.h" |
Syntax
template<typename ElemType>
class TBlockedDenseGrid3 : public UE::Geometry::TBasicBlockedDenseGrid3< ElemType, 32 >
Inheritance Hierarchy
- TBlockedGrid3Layout → TBasicBlockedDenseGrid3 → TBlockedDenseGrid3
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Create empty grid | Spatial/BlockedDenseGrid3.h | ||
TBlockedDenseGrid3
(
int32 DimI, |
Create grid with specified domain. | Spatial/BlockedDenseGrid3.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BlockData3Type | TBlockData3< ElemType, BlockSize > | Spatial/BlockedDenseGrid3.h | |
| BlockedDenseGridType | TBasicBlockedDenseGrid3< ElemType, BlockSize > | Spatial/BlockedDenseGrid3.h | |
| BlockedGrid3LayoutType | TBlockedGrid3Layout< BlockSize > | Spatial/BlockedDenseGrid3.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BlockElemCount | int32 | Spatial/BlockedDenseGrid3.h | |
| BlockSize | int32 | Spatial/BlockedDenseGrid3.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElemType GetValueThreadSafe
(
int32 I, |
Spatial/BlockedDenseGrid3.h | ||
ElemType GetValueThreadSafe
(
const FVector3i& CellIJK |
Spatial/BlockedDenseGrid3.h | ||
bool IsValidIndex
(
FVector3i CellIJK |
Spatial/BlockedDenseGrid3.h | ||
void ProcessValueThreadSafe
(
int32 I, |
Call an external lambda with a reference to the grid value at (I,J,K). | Spatial/BlockedDenseGrid3.h | |
void ProcessValueThreadSafe
(
const FVector3i& CellIJK, |
Call an external lambda with a reference to the grid value at CellIJK. | Spatial/BlockedDenseGrid3.h | |
void Reset () |
Discard all allocated blocks but retain grid dimensions | Spatial/BlockedDenseGrid3.h | |
void Reset
(
int32 DimI, |
Reconfigure the grid to have the target dimensions and default value. | Spatial/BlockedDenseGrid3.h | |
void Resize
(
int32 DimI, |
Reconfigure the grid to have the target dimensions. | Spatial/BlockedDenseGrid3.h | |
void SetValueThreadSafe
(
const FVector3i& CellIJK, |
Set the grid value at CellIJK, with internal locking, so it is safe to call this from multiple read & write threads | Spatial/BlockedDenseGrid3.h | |
void SetValueThreadSafe
(
int32 I, |
Set the grid value at (I,J,K), with internal locking, so it is safe to call this from multiple read & write threads | Spatial/BlockedDenseGrid3.h | |
FVector3i ToIndex
(
int64 LinearIndex |
Convert a grid cell id to CellIJK coordinates | Spatial/BlockedDenseGrid3.h | |
| Convert grid CellIJK coordinates to a linear ID, note this id is independent of the actual internal data storage. | Spatial/BlockedDenseGrid3.h | ||
int64 ToLinear
(
int32 X, |
Convert grid CellIJK coordinates to a linear ID, note this id is independent of the actual internal data storage. | Spatial/BlockedDenseGrid3.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCriticalSection * GetBlockLock
(
int32 Index |
Skip range checks in non-debug builds | Spatial/BlockedDenseGrid3.h | |
ElemType ReadValueThreadSafe
(
int32 I, |
Spatial/BlockedDenseGrid3.h | ||
void WriteValueThreadSafe
(
int32 I, |
Spatial/BlockedDenseGrid3.h |