Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Spatial
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Spatial/SparseGrid3.h |
| Include | #include "Spatial/SparseGrid3.h" |
Syntax
template<typename ElemType>
class TSparseGrid3
Remarks
Dynamic sparse 3D grid. Useful in cases where we have grid of some type of non-trivial object and we don't want to pre-allocate full grid of them. So we allocate on-demand. This can be used to implement multi-grid schemes, eg for example the ElemType could be sub-grid of fixed dimension.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FAxisAlignedBox3i | Bounds | Accumulated bounds of all indices inserted into Elements. Not currently used internally. | |
| TMap< FVector3i, ElemType * > | Elements | Sparse grid of allocated elements |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TSparseGrid3 () |
Create empty grid | ||
TSparseGrid3
(
const TSparseGrid3& Other |
|||
TSparseGrid3
(
TSparseGrid3&& Other |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Deletes all grid elements |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ElemType * | |||
| void | AllocatedIteration
(
Func ElementFunc |
Iterate over existing elements and apply ElementFunc(ElementType) to each of them | |
| bool | Delete an element in the grid | ||
| void | FreeAll () |
Delete all elements in the grid | |
| ElemType * | Get the grid element at this index, and optionally allocate it if it doesn't exist | ||
| const ElemType * | Get the grid element at this index | ||
| FAxisAlignedBox3i | |||
| int | GetCount () |
||
| float | GetDensity () |
||
| FVector3i | |||
| bool | |||
| void | RangeIteration
(
FVector3i MinIndex, |
Iterate over existing allocated elements within the integer bounds defined by Min and Max (inclusive), and apply ElementFunc(ElementType) to each of them |
Operators
| Type | Name | Description | |
|---|---|---|---|
| TSparseGrid3 & | operator=
(
const TSparseGrid3& Other |
||
| TSparseGrid3 & | operator=
(
TSparseGrid3&& Other |