Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/WorldPartition > API/Runtime/Engine/WorldPartition/RuntimeSpatialHash > API/Runtime/Engine/WorldPartition/RuntimeSpatialHash/FSquare2DGridHelper
Inheritance Hierarchy
- FSquare2DGridHelper::FGrid2D
- FSquare2DGridHelper::FGridLevel
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/WorldPartition/RuntimeSpatialHash/RuntimeSpatialHashGridHelper.h |
| Include | #include "WorldPartition/RuntimeSpatialHash/RuntimeSpatialHashGridHelper.h" |
Syntax
struct FGrid2D
Variables
| Type | Name | Description | |
|---|---|---|---|
| int64 | CellSize | ||
| int64 | GridSize | ||
| FVector2D | Origin |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FGrid2D
(
const FVector2D& InOrigin, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | ForEachIntersectingCells
(
const FBox& InBox, |
||
| int32 | ForEachIntersectingCells
(
const FSphere& InSphere, |
Runs a function on all intersecting cells for the provided sphere | |
| int32 | ForEachIntersectingCells
(
const FSphericalSector& InShape, |
Runs a function on all intersecting cells for the provided spherical sector | |
| int32 | ForEachIntersectingCellsBreakable
(
const FBox& InBox, |
Runs a function on all intersecting cells for the provided box | |
| bool | GetCellBounds
(
int64 InIndex, |
Returns the cell bounds | |
| bool | GetCellBounds
(
const FGridCellCoord2& InCoords, |
Returns the cell bounds | |
| bool | GetCellCoords
(
const FVector2D& InPos, |
Returns the cell coordinates of the provided position | |
| bool | GetCellCoords
(
const FBox2D& InBounds2D, |
Returns the cells coordinates of the provided box | |
| bool | GetCellIndex
(
const FGridCellCoord2& InCoords, |
Returns the cell index of the provided coords | |
| bool | GetCellIndex
(
const FVector& InPos, |
Returns the cell index of the provided position | |
| int32 | GetNumIntersectingCells
(
const FBox& InBox |
Get the number of intersecting cells of the provided box | |
| bool | IsValidCoords
(
const FGridCellCoord2& InCoords |
Validate that the coordinates fit the grid size |