TSimpleCellGrid

No virtuals on purpose

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Public/SimpleCellGrid.h

Include

#include "SimpleCellGrid.h"

Syntax

template<typename CellType, int InvalidCellValue>
struct TSimpleCellGrid

Remarks

No virtuals on purpose

Variables

Name Description

Public variable

FVector

 

BoundsSize

Protected variable

TArray< FCellTy...

 

Cells

Public variable

float

 

GridCellSize

Public variable

FGridSize2D

 

GridSize

Public variable

FVector

 

Origin

Public variable

FBox

 

WorldBounds

Constructors

Name Description

Public function

TSimpleCellGrid()

Functions

Name Description

Public function

void

 

AllocateMemory()

Public function

void

 

CleanUp()

Public function

void

 

FreeMemory()

Public function Const

uint32

 

GetAllocatedSize()

Public function Const

const FCellT...

 

GetCellAtIndexUnsafe

(
    int32 CellIndex
)

Public function

FCellType &

 

GetCellAtIndexUnsafe

(
    int32 CellIndex
)

Public function Const

const FCellT...

 

GetCellAtWorldLocation

(
    const FVector& WorldLocation
)

Public function Const

const FCellT...

 

GetCellAtWorldLocationUnsafe

(
    const FVector& WorldLocation
)

Public function Const

FIntVector

 

GetCellCoords

(
    int32 CellIndex
)

Convert cell index to (X,Y) coords on grid

Public function Const

FIntVector

 

GetCellCoords

(
    const FVector& WorldLocation
)

Convert world location to (X,Y) coords on grid, result is clamped to grid

Public function Const

FIntVector

 

GetCellCoordsUnsafe

(
    const FVector& WorldLocation
)

Convert world location to (X,Y) coords on grid, result can be outside grid

Public function Const

int32

 

GetCellCoordX

(
    int32 CellIndex
)

Convert cell index to coord X on grid, result can be invalid

Public function Const

int32

 

GetCellCoordY

(
    int32 CellIndex
)

Convert cell index to coord Y on grid, result can be invalid

Public function Const

int32

 

GetCellIndex

(
    int32 LocationX,
    int32 LocationY
)

Convert (X,Y) coords on grid to cell index, returns -1 for position outside grid

Public function Const

int32

 

GetCellIndex

(
    const FVector& WorldLocation
)

Convert world location to cell index, returns -1 for position outside grid

Public function Const

int32

 

GetCellIndexUnsafe

(
    int32 LocationX,
    int32 LocationY
)

Convert (X,Y) coords on grid to cell index, result can be invalid

Public function Const

int32

 

GetCellIndexUnsafe

(
    const FIntVector& CellCoords
)

Convert (X,Y) coords on grid to cell index, result can be invalid

Public function Const

int32

 

GetCellIndexUnsafe

(
    const FVector& WorldLocation
)

Convert world location to cell index, result can be invalid

Public function Const

int32

 

GetCellsCount()

Public function Const

FBox

 

GetWorldCellBox

(
    int32 LocationX,
    int32 LocationY
)

Public function Const

FBox

 

GetWorldCellBox

(
    int32 CellIndex
)

Public function Const

FVector

 

GetWorldCellCenter

(
    int32 LocationX,
    int32 LocationY
)

Public function Const

FVector

 

GetWorldCellCenter

(
    int32 CellIndex
)

Public function

bool

 

Init

(
    float InCellSize,
    const FBox& Bounds
)

Public function Const

bool

 

IsValid()

Public function Const

bool

 

IsValidCoord

(
    const FIntVector& CellCoords
)

Public function Const

bool

 

IsValidCoord

(
    int32 LocationX,
    int32 LocationY
)

Public function Const

bool

 

IsValidIndex

(
    const int32 CellIndex
)

Public function Const

int32

 

Num()

Public function

void

 

Serialize

(
    FArchive& Ar
)

Public function

void

 

UpdateWorldBounds()

Public function

void

 

Zero()

Operators

Name Description

Public function Const

const FCellT...

 

operator[]

(
    int32 CellIndex
)

Public function

FCellType &

 

operator[]

(
    int32 CellIndex
)

Typedefs

Name

Description

FCellType