Class arena_grid
Defined in File arena_grid.hpp
Inheritance Relationships
Base Type
public rds::stacked_grid2D< arena_layer_stack >
Class Documentation
-
class arena_grid : public rds::stacked_grid2D<arena_layer_stack>
2D grid of cds::cell2D objects containing the state of the geometrical extent of the arena floor.
Public Types
-
using const_view = rds::base_grid2D<cds::cell2D>::const_grid_view
-
using coord_type = rmath::vector2z
-
using value_type = cds::cell2D
-
using view = rds::base_grid2D<cds::cell2D>::grid_view
Public Functions
-
inline arena_grid(const rmath::vector2d &dims, const rtypes::discretize_ratio &resolution)
The origin of the grid is in the lower left corner at (0,0).
- Parameters:
dims – The dimensions of the arena.
resolution – The arena resolution (i.e. what is the size of 1 cell in the 2D grid).
-
inline std::shared_mutex *mtx(void)
-
inline void reset(void)
Reset all the cells within the grid, removing all references to old blocks as well as setting all cells back to an empty state.
Public Static Attributes
-
static constexpr const size_t kCell = 0
-
using const_view = rds::base_grid2D<cds::cell2D>::const_grid_view