CellModules
|
Template class representing a 2D grid of cell pointers. More...
#include <CellGrid.hpp>
Public Member Functions | |
void | resizeGrid (int size) |
Set the grid size to a square of given size. More... | |
void | resizeGrid (int w, int h) |
Set the grid size to given width and height. More... | |
void | setToreX (bool b) |
Set the toreX property. More... | |
void | setToreY (bool b) |
Set the toreY property. More... | |
void | setTore (bool x, bool y) |
Set both toreX and toreY properties. More... | |
CellGrid () | |
Default constructor initializing the grid with default width and height. More... | |
Public Attributes | |
vector< vector< vector< cell_t * > > > | grid |
bool | toreX = false |
bool | toreY = false |
int | height = 10 |
int | width = 10 |
Template class representing a 2D grid of cell pointers.
cell_t | Type of the cell stored in the grid. |
Definition at line 52 of file CellGrid.hpp.
|
inline |
Default constructor initializing the grid with default width and height.
Definition at line 102 of file CellGrid.hpp.
|
inline |
Set the grid size to a square of given size.
size | Size of the grid (both width and height) |
Definition at line 64 of file CellGrid.hpp.
|
inline |
Set the grid size to given width and height.
w | Width of the grid |
h | Height of the grid |
Definition at line 73 of file CellGrid.hpp.
|
inline |
Set both toreX and toreY properties.
x | Boolean value to set toreX |
y | Boolean value to set toreY |
Definition at line 97 of file CellGrid.hpp.
|
inline |
Set the toreX property.
b | Boolean value to set toreX |
Definition at line 84 of file CellGrid.hpp.
|
inline |
Set the toreY property.
b | Boolean value to set toreY |
Definition at line 90 of file CellGrid.hpp.
vector<vector<vector<cell_t *> > > Grid2D::CellGrid< cell_t >::grid |
3D vector containing vectors of cell pointers
Definition at line 53 of file CellGrid.hpp.
int Grid2D::CellGrid< cell_t >::height = 10 |
Height of the grid
Definition at line 57 of file CellGrid.hpp.
bool Grid2D::CellGrid< cell_t >::toreX = false |
Boolean property indicating if the grid wraps around on the X-axis
Definition at line 55 of file CellGrid.hpp.
bool Grid2D::CellGrid< cell_t >::toreY = false |
Boolean property indicating if the grid wraps around on the Y-axis
Definition at line 56 of file CellGrid.hpp.
int Grid2D::CellGrid< cell_t >::width = 10 |
Width of the grid
Definition at line 58 of file CellGrid.hpp.