![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SparseGrid3.h>
Public Member Functions | |
| TSparseGrid3 () | |
| ~TSparseGrid3 () | |
| TSparseGrid3 (const TSparseGrid3 &Other)=delete | |
| TSparseGrid3 & | operator= (const TSparseGrid3 &Other)=delete |
| TSparseGrid3 (TSparseGrid3 &&Other) noexcept | |
| TSparseGrid3 & | operator= (TSparseGrid3 &&Other) noexcept |
| bool | Has (const FVector3i &Index) const |
| const ElemType * | Get (const FVector3i &Index) const |
| ElemType * | Get (const FVector3i &Index, bool bAllocateIfMissing) |
| bool | Free (const FVector3i &Index) |
| void | FreeAll () |
| int | GetCount () const |
| float | GetDensity () const |
| FAxisAlignedBox3i | GetBoundsInclusive () const |
| FVector3i | GetDimensions () const |
| template<typename Func > | |
| void | AllocatedIteration (Func ElementFunc) const |
| template<typename Func > | |
| void | RangeIteration (FVector3i MinIndex, FVector3i MaxIndex, Func ElementFunc) const |
Protected Member Functions | |
| ElemType * | Allocate (const FVector3i &index) |
Protected Attributes | |
| TMap< FVector3i, ElemType * > | Elements |
| FAxisAlignedBox3i | Bounds |
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.
|
inline |
Create empty grid
|
inline |
Deletes all grid elements
|
delete |
|
inlinenoexcept |
|
inlineprotected |
|
inline |
Iterate over existing elements and apply ElementFunc(ElementType) to each of them
|
inline |
Delete an element in the grid
| Index | integer grid index |
|
inline |
Delete all elements in the grid
|
inline |
Get the grid element at this index
| Index | integer grid index |
|
inline |
Get the grid element at this index, and optionally allocate it if it doesn't exist
| Index | integer grid index |
| bAllocateIfMissing | if the element at this index is null, allocate a new one |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| Index | an integer grid index |
|
delete |
|
inlinenoexcept |
|
inline |
Iterate over existing allocated elements within the integer bounds defined by Min and Max (inclusive), and apply ElementFunc(ElementType) to each of them
|
protected |
accumulated bounds of all indices inserted into Elements. Not currently used internally.
|
protected |
sparse grid of allocated elements