|
|
| masked_grid (const masked_grid &)=delete |
| |
|
masked_grid & | operator= (const masked_grid &)=delete |
| |
|
| masked_grid (masked_grid &&) noexcept=default |
| |
|
masked_grid & | operator= (masked_grid &&) noexcept=default |
| |
| | masked_grid (mask m) |
| | Construct a masked grid from a mask object.
|
| |
| std::shared_ptr< cell > | search (int index) const noexcept override |
| | Search for a cell by index, respecting the mask.
|
| |
| int | num_cells () const noexcept override |
| | Return the number of available (unmasked) cells.
|
| |
| const mask & | get_mask () const noexcept |
| | Access the mask used by this grid.
|
| |
| std::shared_ptr< cell > | random_cell (randomizer &rng) const noexcept |
| | Return a random available cell based on the mask.
|
| |
| | grid (unsigned int rows=1u, unsigned int columns=1u, unsigned int levels=1u) |
| | Construct a grid using unsigned integers.
|
| |
| | grid (const std::tuple< unsigned int, unsigned int, unsigned int > &dimens) |
| | Construct a grid using a tuple of unsigned integers.
|
| |
| | grid (const grid &other) |
| | Copy constructor.
|
| |
| grid & | operator= (const grid &other) |
| | Assignment operator.
|
| |
| | grid (grid &&other) noexcept |
| | Move constructor.
|
| |
| grid & | operator= (grid &&other) noexcept |
| | Move assignment operator.
|
| |
|
| ~grid () override |
| | Destructor.
|
| |
| grid_operations & | operations () noexcept override |
| |
| const grid_operations & | operations () const noexcept override |
| |
| std::tuple< unsigned int, unsigned int, unsigned int > | get_dimensions () const noexcept override |
| | Get the dimensions of the grid.
|
| |
| std::string | contents_of (std::shared_ptr< cell > const &c) const noexcept override |
| | Get detailed information of a cell in the grid.
|
| |
| std::uint32_t | background_color_for (std::shared_ptr< cell > const &c) const noexcept override |
| | Get the background color for a cell in the grid.
|
| |
| std::shared_ptr< cell > | get_neighbor (std::shared_ptr< cell > const &c, direction dir) const noexcept override |
| | Get neighbor by the cell's respective location.
|
| |
| std::vector< std::shared_ptr< cell > > | get_neighbors (std::shared_ptr< cell > const &c) const noexcept override |
| | Get all the neighbors by the cell.
|
| |
| void | set_neighbor (const std::shared_ptr< cell > &c, direction dir, std::shared_ptr< cell > const &neighbor) noexcept override |
| | Set neighbor for a cell in a given direction.
|
| |
| std::shared_ptr< cell > | get_north (const std::shared_ptr< cell > &c) const noexcept override |
| |
| std::shared_ptr< cell > | get_south (const std::shared_ptr< cell > &c) const noexcept override |
| |
| std::shared_ptr< cell > | get_east (const std::shared_ptr< cell > &c) const noexcept override |
| |
| std::shared_ptr< cell > | get_west (const std::shared_ptr< cell > &c) const noexcept override |
| |
| void | clear_cells () noexcept override |
| | Cleanup cells by cleaning up links within cells.
|
| |
| void | set_str (std::string const &str) noexcept override |
| | Set a string value.
|
| |
| std::string | get_str () const noexcept override |
| | Get a string value.
|
| |
| void | set_file (std::string const &f) noexcept override |
| | Set the file name.
|
| |
| std::string | get_file () const noexcept override |
| | Get the file name.
|
| |
| std::vector< std::tuple< int, int, int, int > > | get_vertices () const noexcept override |
| | Get the vertices.
|
| |
| void | set_vertices (const std::vector< std::tuple< int, int, int, int > > &vertices) noexcept override |
| | Set the vertices.
|
| |
| std::vector< std::vector< std::uint32_t > > | get_faces () const noexcept override |
| | Get the faces.
|
| |
| void | set_faces (const std::vector< std::vector< std::uint32_t > > &faces) noexcept override |
| | Set the faces.
|
| |
| std::vector< std::uint8_t > | get_pixels () const noexcept override |
| | Get the pixel data for image generation.
|
| |
| void | set_pixels (const std::vector< std::uint8_t > &pixels) noexcept override |
| | Set the pixel data for image generation.
|
| |
|
void | resize (unsigned int rows, unsigned int cols, unsigned int levels) noexcept override |
| | Resize: clear all cells/topology and reset dimensions.
|
| |
|
virtual | ~grid_interface ()=default |
| | Virtual destructor for the grid_interface class.
|
| |
|
virtual | ~grid_operations ()=default |
| | Destroys the grid_operations object and releases any associated resources.
|
| |
| virtual void | set_vertices (const std::vector< std::tuple< std::int32_t, std::int32_t, std::int32_t, std::int32_t > > &vertices) noexcept=0 |
| | Set the vertices.
|
| |
| virtual void | resize (std::uint32_t rows, std::uint32_t cols, std::uint32_t levels) noexcept=0 |
| | Resize the grid to new dimensions, clearing all existing cells and topology.
|
| |
A grid that restricts cell availability based on a boolean mask.
Cells at positions where the mask returns false are treated as non-existent. Inherits from grid and overrides search() so that algorithms naturally skip blocked positions. Use binary_tree or sidewinder algorithms with masked grids.