Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Spatial
Inheritance Hierarchy
- TBlockedGrid3Layout
- TBasicBlockedDenseGrid3
- TBlockedDenseGrid3
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Spatial/BlockedDenseGrid3.h |
| Include | #include "Spatial/BlockedDenseGrid3.h" |
Syntax
template<typename ElemType>
class TBlockedDenseGrid3 : public UE::Geometry::TBasicBlockedDenseGrid3< ElemType, 32 >
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FCriticalSection > | BlockLocks |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Create empty grid | |||
TBlockedDenseGrid3
(
int32 DimI, |
Create grid with specified domain. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FCriticalSection * | GetBlockLock
(
int32 Index |
Skip range checks in non-debug builds | |
| ElemType | GetValueThreadSafe
(
int32 I, |
||
| ElemType | GetValueThreadSafe
(
const FVector3i& CellIJK |
||
| bool | IsValidIndex
(
FVector3i CellIJK |
||
| void | ProcessValueThreadSafe
(
int32 I, |
Call an external lambda with a reference to the grid value at (I,J,K). | |
| void | ProcessValueThreadSafe
(
const FVector3i& CellIJK, |
Call an external lambda with a reference to the grid value at CellIJK. | |
| ElemType | ReadValueThreadSafe
(
int32 I, |
||
| void | Reset () |
Discard all allocated blocks but retain grid dimensions | |
| void | Reset
(
int32 DimI, |
Reconfigure the grid to have the target dimensions and default value. | |
| void | Resize
(
int32 DimI, |
Reconfigure the grid to have the target dimensions. | |
| 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 | |
| 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 | |
| FVector3i | ToIndex
(
int64 LinearIndex |
Convert a grid cell id to CellIJK coordinates | |
| int64 | Convert grid CellIJK coordinates to a linear ID, note this id is independent of the actual internal data storage. | ||
| int64 | ToLinear
(
int32 X, |
Convert grid CellIJK coordinates to a linear ID, note this id is independent of the actual internal data storage. | |
| void | WriteValueThreadSafe
(
int32 I, |
Typedefs
| Name | Description |
|---|---|
| BlockData3Type | |
| BlockedDenseGridType | |
| BlockedGrid3LayoutType |
Constants
| Name | Description |
|---|---|
| BlockElemCount | |
| BlockSize |