TSparseGrid3

Dynamic sparse 3D grid.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/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

Name Description

Protected variable

FAxisAlignedBox...

 

Bounds

Accumulated bounds of all indices inserted into Elements. Not currently used internally.

Protected variable

TMap< FVector3i...

 

Elements

Sparse grid of allocated elements

Constructors

Name Description

Public function

TSparseGrid3()

Create empty grid

Destructors

Name Description

Public function

~TSparseGrid3()

Deletes all grid elements

Functions

Name Description

Protected function

ElemType ...

 

Allocate

(
    const FVector3i& index
)

Public function Const

void

 

AllocatedIteration

(
    Func ElementFunc
)

Iterate over existing elements and apply ElementFunc to each of them

Public function

bool

 

Free

(
    const FVector3i& Index
)

Delete an element in the grid

Public function

void

 

FreeAll()

Delete all elements in the grid

Public function Const

const ElemTy...

 

Get

(
    const FVector3i& Index
)

Get the grid element at this index

Public function

ElemType ...

 

Get

(
    const FVector3i& Index,
    bool bAllocateIfMissing
)

Get the grid element at this index, and optionally allocate it if it doesn't exist

Public function Const

FAxisAligned...

 

GetBoundsInclusive()

Public function Const

int

 

GetCount()

Public function Const

float

 

GetDensity()

Public function Const

FVector3i

 

GetDimensions()

Public function Const

bool

 

Has

(
    const FVector3i& Index
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss