![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
Staggered cells. More...
#include <gf/Cells.h>
Public Member Functions | |
StaggeredCells (Vector2f tileSize, CellAxis axis, CellIndex index) | |
Make staggered cells of the specified size. More... | |
RectF | computeBounds (Vector2i layerSize) const noexcept override |
Compute the local bounds of the cells. More... | |
RectI | computeVisibleArea (const RectF &local) const noexcept override |
Compute the visible area in terms of coordinates. More... | |
RectF | computeCellBounds (Vector2i coords) const noexcept override |
Compute the cell bounds. More... | |
Vector2i | computeCoordinates (Vector2f position) const noexcept override |
Compute the coordinates of a cell. More... | |
Polyline | computePolyline (Vector2i coords) const override |
Compute the polyline representing a cell. More... | |
std::vector< Vector2i > | computeNeighbors (Vector2i coords, Vector2i layerSize, Flags< CellNeighborQuery > flags=gf::None) const override |
Compute the neighbors of a cell. More... | |
![]() | |
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... | |
Staggered cells.
Make staggered cells of the specified size.
tileSize | The size of a cell |
axis | The cells axis |
index | The cells index |
Compute the local bounds of the cells.
layerSize | The size of the layer |
Implements gf::Cells.
Compute the cell bounds.
coords | The coordinates of the cell |
Implements gf::Cells.
Compute the coordinates of a cell.
position | The local position |
Implements gf::Cells.
|
overridevirtual |
Compute the neighbors of a cell.
coords | The coordinates of the cell |
layerSize | The size of the layer |
flags | The parameters of the query |
Implements gf::Cells.
Compute the polyline representing a cell.
coords | The coordinates of the cell |
Implements gf::Cells.