TSimpleCellGrid

No virtuals on purpose

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

uint32

 

CellSize

DEPRECATED, use GridCellSize instead of this.

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

(
    const FVector& WorldLocation
)

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

Public function Const

FIntVector

 

GetCellCoords

(
    int32 CellIndex
)

Convert cell index to (X,Y) coords on 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

(
    const FVector& WorldLocation
)

Convert world location to cell index, result can be invalid

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

 

GetCellsCount()

Public function Const

FBox

 

GetWorldCellBox

(
    int32 CellIndex
)

Public function Const

FBox

 

GetWorldCellBox

(
    int32 LocationX,
    int32 LocationY
)

Public function Const

FVector

 

GetWorldCellCenter

(
    int32 CellIndex
)

Public function Const

FVector

 

GetWorldCellCenter

(
    int32 LocationX,
    int32 LocationY
)

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

FCellType &

 

operator[]

(
    int32 CellIndex
)

Public function Const

const FCellT...

 

operator[]

(
    int32 CellIndex
)

Typedefs

Name

Description

FCellType

Deprecated Functions

Name Description

Public function Const

uint32

 

CellCoordsToCellIndex

(
    const int32 LocationX,
    const int32 LocationY
)

This function is now deprecated, please use GetCellIndex instead.

Public function Const

FIntVector

 

CellIndexToCoords

(
    uint32 CellIndex,
    uint32& LocationX,
    uint32& LocationY
)

This function is now deprecated, please use GetCellCoords instead.

Public function Const

FIntVector

 

CellIndexToCoords

(
    uint32 CellIndex
)

This function is now deprecated, please use GetCellCoords instead.

Public function Const

const FCellT...

 

GetCellAtWorldLocationSafe

(
    const FVector& WorldLocation
)

This function is now deprecated, please use GetCellAtWorldLocation instead.

Public function Const

uint32

 

GetValuesMemorySize()

This function is now deprecated, please use GetAllocatedSize instead.

Public function

void

 

Init

(
    uint32 InCellSize,
    const FBox& Bounds
)

This function is now deprecated, please use the one with float CellSize argument

Public function Const

bool

 

IsValidCellIndex

(
    const int32 CellIndex
)

This function is now deprecated, please use IsValidIndex instead.

Public function Const

FIntVector

 

WorldToCellCoords

(
    const FVector& WorldLocation
)

This function is now deprecated, please use GetCellCoords instead.

Public function Const

void

 

WorldToCellCoords

(
    const FVector& WorldLocation,
    uint32& LocationX,
    uint32& LocationY
)

This function is now deprecated, please use GetCellCoords instead.

Public function Const

uint32

 

WorldToCellIndex

(
    const FVector& WorldLocation
)

This function is now deprecated, please use GetCellIndex instead.

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