|
Zappy GUI
C++ graphic client: renderer, camera, network
|
Helper class for rendering the game world grid. More...
#include <GridRenderer.hpp>
Collaboration diagram for GridRenderer:Static Public Member Functions | |
| static void | drawTiles (int width, int height, float tileSize) |
| Draws filled tile quads for the entire grid in a checkerboard pattern. | |
| static void | drawGrid (int width, int height, float tileSize, Color color=GRAY) |
| Draws a custom grid centered at (0, 0, 0). | |
| static void | drawTileHighlight (int tileX, int tileY, int worldWidth, int worldHeight, float tileSize, Color color, float lineThickness=1.0f) |
| Draws a highlight outline around a specific tile. | |
Static Public Attributes | |
| static constexpr Color | TILE_COLOR = {230, 230, 230, 255} |
| static constexpr Color | TILE_COLOR_ALT = {210, 210, 210, 255} |
Helper class for rendering the game world grid.
Definition at line 8 of file GridRenderer.hpp.
|
static |
Draws a custom grid centered at (0, 0, 0).
| width | Number of tiles in X direction. |
| height | Number of tiles in Z direction. |
| tileSize | Size of each tile in world units. |
| color | Grid line color. |
Definition at line 18 of file GridRenderer.cpp.
|
static |
Draws a highlight outline around a specific tile.
| tileX | Tile X coordinate. |
| tileY | Tile Y coordinate (Z in 3D). |
| worldWidth | Total world width in tiles. |
| worldHeight | Total world height in tiles. |
| tileSize | Size of each tile in world units. |
| color | Color of the highlight outline. |
| lineThickness | Thickness of the outline lines. |
Definition at line 36 of file GridRenderer.cpp.
Referenced by RaylibRenderer::_drawSelectionHighlight().
Here is the caller graph for this function:
|
static |
Draws filled tile quads for the entire grid in a checkerboard pattern.
| width | Number of tiles in X direction. |
| height | Number of tiles in Z direction. |
| tileSize | Size of each tile in world units. |
Definition at line 3 of file GridRenderer.cpp.
References TILE_COLOR, and TILE_COLOR_ALT.
Referenced by RaylibRenderer::_render3D().
Here is the caller graph for this function:
|
staticconstexpr |
Definition at line 10 of file GridRenderer.hpp.
Referenced by drawTiles().
|
staticconstexpr |
Definition at line 11 of file GridRenderer.hpp.
Referenced by drawTiles().