Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Spatial
Inheritance Hierarchy
- TBlockedGrid3Layout
- TBasicBlockedDenseGrid3
- TBlockedDenseGrid3
- TBlockedGrid3
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Spatial/BlockedDenseGrid3.h |
| Include | #include "Spatial/BlockedDenseGrid3.h" |
Syntax
template<typename ElemType, int32 BlockSize_>
class TBasicBlockedDenseGrid3 : public UE::Geometry::TBlockedGrid3Layout< BlockSize_ >
Remarks
TBasicBlockedDenseGrid3 represents a 3D blocked uniform grid.
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.
Block-level default values are returned when querying a grid cell in an unallocated block.
For multi-threaded applications consider using the derived classes TBlockedDenseGrid3 which manages internal locks, or TBlockedGrid3 with your own lock provider.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FBlock3 > | Blocks | ||
| ElemType | DefaultValue | The value to use to initialize new blocks |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Create empty grid | |||
TBasicBlockedDenseGrid3
(
int32 DimI, |
Create grid with specified domain. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AllocateTopologyUnionImpl
(
const OtherGridType& OtherGrid |
||
| const FBlock3 & | GetBlock
(
int32 Index |
||
| FBlock3 & | GetBlock
(
int32 Index |
Skip range checks in non-debug builds | |
| int32 | GetNumBlocks () |
||
| ElemType | GetValue
(
int32 I, |
||
| ElemType | |||
| bool | IsBlockAllocated
(
const FBlock3& Block |
||
| bool | IsBlockAllocated
(
const int32 BlockIndex |
||
| bool | PreAllocateFromSourceGrid
(
const TBasicBlockedDenseGrid3< OtherElemType, BlockSize >& SourceGrid |
Pre-allocate the grid blocks that also exist in SourceGrid of the same dimensions. | |
| void | ProcessValue
(
const FVector3i& CellIJK, |
Call an external lambda with a reference to the grid value at CellIJK. | |
| void | ProcessValue
(
int32 I, |
Call an external lambda with a reference to the grid value at (I,J,K). | |
| ElemType | ReadValue
(
int32 I, |
||
| ElemType | ReadValue
(
const int32& BlockIndex, |
||
| ElemType | ReadValueWithLock
(
const int32& BlockIndex, |
||
| 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 | Set the grid value at CellIJK | ||
| void | SetValue
(
int32 I, |
Set the grid value at (I,J,K) | |
| BlockData3Type & | TouchBlockData
(
const int32 BlockIndex |
Return a reference to the block data buffer associated with the specified block, allocating if needed | |
| void | WriteValue
(
const int32& BlockIndex, |
Write methods | |
| void | WriteValue
(
int32 I, |
||
| void | WriteValueWithLock
(
const int32& BlockIndex, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FBlock3 | A default value and a pointer to a block that will be allocated on first write. |
Typedefs
| Name | Description |
|---|---|
| BlockData3Type | |
| BlockedGrid3LayoutType |
Constants
| Name | Description |
|---|---|
| BlockElemCount | |
| BlockSize |