Navigation
API > API/Runtime > API/Runtime/AIModule
No virtuals on purpose
| Name | TSimpleCellGrid |
| Type | struct |
| Header File | /Engine/Source/Runtime/AIModule/Public/SimpleCellGrid.h |
| Include Path | #include "SimpleCellGrid.h" |
Syntax
template<typename CellType, int InvalidCellValue>
struct TSimpleCellGrid
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSimpleCellGrid() |
SimpleCellGrid.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FCellType | CellType | SimpleCellGrid.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BoundsSize | FVector | SimpleCellGrid.h | ||
| GridCellSize | float | SimpleCellGrid.h | ||
| GridSize | FGridSize2D | SimpleCellGrid.h | ||
| Origin | FVector | SimpleCellGrid.h | ||
| WorldBounds | FBox | SimpleCellGrid.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AllocateMemory() |
SimpleCellGrid.h | ||
void CleanUp() |
SimpleCellGrid.h | ||
void FreeMemory() |
SimpleCellGrid.h | ||
uint32 GetAllocatedSize() |
SimpleCellGrid.h | ||
const FCellType & GetCellAtCoordsUnsafe
(
int32 LocationX, |
SimpleCellGrid.h | ||
FCellType & GetCellAtCoordsUnsafe
(
int32 LocationX, |
SimpleCellGrid.h | ||
const FCellType & GetCellAtIndexUnsafe
(
int32 CellIndex |
SimpleCellGrid.h | ||
FCellType & GetCellAtIndexUnsafe
(
int32 CellIndex |
SimpleCellGrid.h | ||
const FCellType & GetCellAtWorldLocation
(
const FVector& WorldLocation |
SimpleCellGrid.h | ||
const FCellType & GetCellAtWorldLocationUnsafe
(
const FVector& WorldLocation |
SimpleCellGrid.h | ||
FIntVector GetCellCoords
(
int32 CellIndex |
Convert cell index to (X,Y) coords on grid | SimpleCellGrid.h | |
FIntVector GetCellCoords
(
const FVector& WorldLocation |
Convert world location to (X,Y) coords on grid, result is clamped to grid | SimpleCellGrid.h | |
FIntVector GetCellCoordsUnsafe
(
const FVector& WorldLocation |
Convert world location to (X,Y) coords on grid, result can be outside grid | SimpleCellGrid.h | |
int32 GetCellCoordX
(
int32 CellIndex |
Convert cell index to coord X on grid, result can be invalid | SimpleCellGrid.h | |
int32 GetCellCoordY
(
int32 CellIndex |
Convert cell index to coord Y on grid, result can be invalid | SimpleCellGrid.h | |
int32 GetCellIndex
(
int32 LocationX, |
Convert (X,Y) coords on grid to cell index, returns -1 for position outside grid | SimpleCellGrid.h | |
int32 GetCellIndex
(
const FVector& WorldLocation |
Convert world location to cell index, returns -1 for position outside grid | SimpleCellGrid.h | |
int32 GetCellIndexUnsafe
(
const FVector& WorldLocation |
Convert world location to cell index, result can be invalid | SimpleCellGrid.h | |
int32 GetCellIndexUnsafe
(
const FIntVector& CellCoords |
Convert (X,Y) coords on grid to cell index, result can be invalid | SimpleCellGrid.h | |
int32 GetCellIndexUnsafe
(
int32 LocationX, |
Convert (X,Y) coords on grid to cell index, result can be invalid | SimpleCellGrid.h | |
FIntRect GetCellRectangleFromBox
(
const FBox& WorldBox |
Compute a rectangle of cells overlapping the given WorldBox. | SimpleCellGrid.h | |
int32 GetCellsCount() |
SimpleCellGrid.h | ||
FIntRect GetGridRectangle() |
Return an IntRect that includes all the cells of the grid. Max is inclusive. | SimpleCellGrid.h | |
FBox GetWorldCellBox
(
int32 LocationX, |
Return the bounding box of a cell. | SimpleCellGrid.h | |
FBox GetWorldCellBox
(
int32 CellIndex |
Return the bounding box of a cell. | SimpleCellGrid.h | |
FBox2D GetWorldCellBox2D
(
int32 LocationX, |
Return the 2D bounding box of a cell. | SimpleCellGrid.h | |
FBox2D GetWorldCellBox2D
(
int32 CellIndex |
Return the 2D bounding box of a cell. | SimpleCellGrid.h | |
FVector GetWorldCellCenter
(
int32 CellIndex |
SimpleCellGrid.h | ||
FVector GetWorldCellCenter
(
int32 LocationX, |
SimpleCellGrid.h | ||
FBox GetWorldCellRectangleBox
(
const FIntRect& CellRect |
Return the world bounding box of all cells included in the given rectangle. | SimpleCellGrid.h | |
bool Init
(
const float InCellSize, |
Initialize the grid from a bounding box | SimpleCellGrid.h | |
bool Init
(
const float InCellSize, |
Initialize the grid | SimpleCellGrid.h | |
bool IsValid() |
SimpleCellGrid.h | ||
bool IsValidCoord
(
const FIntVector& CellCoords |
SimpleCellGrid.h | ||
bool IsValidCoord
(
int32 LocationX, |
SimpleCellGrid.h | ||
bool IsValidIndex
(
const int32 CellIndex |
SimpleCellGrid.h | ||
int32 Num() |
SimpleCellGrid.h | ||
void Serialize
(
FArchive& Ar |
SimpleCellGrid.h | ||
void SetVerticalInterval
(
const FFloatInterval& VerticalInterval |
Change the vertical position of the grid by providing an interval | SimpleCellGrid.h | |
void UpdateWorldBounds() |
SimpleCellGrid.h | ||
void Zero() |
SimpleCellGrid.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCellType & operator[]
(
int32 CellIndex |
SimpleCellGrid.h | ||
const FCellType & operator[]
(
int32 CellIndex |
SimpleCellGrid.h |