gwnavgeneration/input/inputcellinfogrid.h Source File
Go to the documentation of this file.
9 #ifndef GwNavGen_InputCellInfoGrid_H
10 #define GwNavGen_InputCellInfoGrid_H
21 class GeneratorSystem;
24 class InputCellInfoGrid
29 InputCellInfoGrid() {}
31 void Add(GeneratorSectorBuilder* sectorBuilder,
const CellPos& cellPos, Ptr<BlobHandler<InputCellBlob> > inputCellHandler =
KY_NULL)
33 InputCellInfoArrayAtPos* inputCellInfoArrayAtPos = m_grid.GetOrCreate(cellPos.x, cellPos.y);
35 InputCellInfo inputCellInfo(sectorBuilder, cellPos, inputCellHandler);
37 KY_ASSERT(inputCellInfoArrayAtPos->DoesContain(inputCellInfo) ==
false);
38 inputCellInfoArrayAtPos->PushBack(inputCellInfo);
41 InputCellInfoArrayAtPos* GetArrayAtPos(
const CellPos& pos) {
return m_grid.Get(pos.x, pos.y); }
42 InputCellInfoArrayAtPos* GetArrayAtPos(
CellCoord x,
CellCoord y) {
return m_grid.Get(x, y); }
44 Ptr<InputCellInfoArrayAtPos>* GetArrayOfArray() {
return m_grid.GetElements(); }
45 KyUInt32 GetArrayOfArrayCount() {
return m_grid.GetElementsCount(); }
48 DenseGridAndArrayOfRefPtr<InputCellInfoArrayAtPos> m_grid;
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
KyInt32 CellCoord
A type that represents the placement of a cell on one axis of a 2D grid.
Definition: navmeshtypes.h:32