Navigation
API > API/Runtime > API/Runtime/GeometryCore
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.
| Name | TBasicBlockedDenseGrid3 |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Spatial/BlockedDenseGrid3.h |
| Include Path | #include "Spatial/BlockedDenseGrid3.h" |
Syntax
template<typename ElemType, int32 BlockSize_>
class TBasicBlockedDenseGrid3 : public UE::Geometry::TBlockedGrid3Layout< BlockSize_ >
Inheritance Hierarchy
- TBlockedGrid3Layout → TBasicBlockedDenseGrid3
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TBasicBlockedDenseGrid3
(
int32 DimI, |
Create grid with specified domain. | Spatial/BlockedDenseGrid3.h | |
| Create empty grid | Spatial/BlockedDenseGrid3.h |
Structs
| Name | Remarks |
|---|---|
| FBlock3 | A default value and a pointer to a block that will be allocated on first write. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BlockData3Type | TBlockData3< 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 |
|---|---|---|---|
int32 GetNumBlocks() |
Spatial/BlockedDenseGrid3.h | ||
ElemType GetValue
(
int32 I, |
Spatial/BlockedDenseGrid3.h | ||
| Spatial/BlockedDenseGrid3.h | |||
bool PreAllocateFromSourceGrid
(
const TBasicBlockedDenseGrid3< OtherElemType, BlockSize >& SourceGrid |
Pre-allocate the grid blocks that also exist in SourceGrid of the same dimensions. | Spatial/BlockedDenseGrid3.h | |
void ProcessValue
(
const FVector3i& CellIJK, |
Call an external lambda with a reference to the grid value at CellIJK. | Spatial/BlockedDenseGrid3.h | |
void ProcessValue
(
int32 I, |
Call an external lambda with a reference to the grid value at (I,J,K). | 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 | |
| Set the grid value at CellIJK | Spatial/BlockedDenseGrid3.h | ||
void SetValue
(
int32 I, |
Set the grid value at (I,J,K) | Spatial/BlockedDenseGrid3.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AllocateTopologyUnionImpl
(
const OtherGridType& OtherGrid |
Spatial/BlockedDenseGrid3.h | ||
| Spatial/BlockedDenseGrid3.h | |||
| Skip range checks in non-debug builds | Spatial/BlockedDenseGrid3.h | ||
bool IsBlockAllocated
(
const FBlock3& Block |
Spatial/BlockedDenseGrid3.h | ||
bool IsBlockAllocated
(
const int32 BlockIndex |
Spatial/BlockedDenseGrid3.h | ||
ElemType ReadValue
(
int32 I, |
Spatial/BlockedDenseGrid3.h | ||
ElemType ReadValue
(
const int32& BlockIndex, |
Spatial/BlockedDenseGrid3.h | ||
ElemType ReadValueWithLock
(
const int32& BlockIndex, |
Spatial/BlockedDenseGrid3.h | ||
BlockData3Type & TouchBlockData
(
const int32 BlockIndex |
Return a reference to the block data buffer associated with the specified block, allocating if needed | Spatial/BlockedDenseGrid3.h | |
void WriteValue
(
const int32& BlockIndex, |
Write methods | Spatial/BlockedDenseGrid3.h | |
void WriteValue
(
int32 I, |
Spatial/BlockedDenseGrid3.h | ||
void WriteValueWithLock
(
const int32& BlockIndex, |
Spatial/BlockedDenseGrid3.h |