![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
The properties of cells. More...
#include <gf/Cells.h>

Public Member Functions | |
| virtual | ~Cells () |
| Virtual destructor. More... | |
| virtual RectF | computeBounds (Vector2i layerSize) const noexcept=0 |
| Compute the local bounds of the cells. More... | |
| virtual RectI | computeVisibleArea (const RectF &local) const noexcept=0 |
| Compute the visible area in terms of coordinates. More... | |
| virtual RectF | computeCellBounds (Vector2i coords) const noexcept=0 |
| Compute the cell bounds. More... | |
| virtual Vector2i | computeCoordinates (Vector2f position) const noexcept=0 |
| Compute the coordinates of a cell. More... | |
| virtual Polyline | computePolyline (Vector2i coords) const =0 |
| Compute the polyline representing a cell. More... | |
| virtual std::vector< Vector2i > | computeNeighbors (Vector2i coords, Vector2i layerSize, Flags< CellNeighborQuery > flags=gf::None) const =0 |
| Compute the neighbors of a cell. More... | |
The properties of cells.
These properties depend on the orientation of the cells in the map:
|
virtual |
Virtual destructor.
Compute the local bounds of the cells.
| layerSize | The size of the layer |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.
Compute the cell bounds.
| coords | The coordinates of the cell |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.
Compute the coordinates of a cell.
| position | The local position |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.
|
pure virtual |
Compute the neighbors of a cell.
| coords | The coordinates of the cell |
| layerSize | The size of the layer |
| flags | The parameters of the query |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.
Compute the polyline representing a cell.
| coords | The coordinates of the cell |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.
Compute the visible area in terms of coordinates.
| local | The visible area |
Implemented in gf::OrthogonalCells, gf::StaggeredCells, and gf::HexagonalCells.