|
Zappy GUI
C++ graphic client: renderer, camera, network
|
Helper class for rendering game entities (players, eggs, resources). More...
#include <EntityRenderer.hpp>
Collaboration diagram for EntityRenderer:Static Public Member Functions | |
| static void | drawPlayer (Vector3 &worldPos, Color teamColor, float rotation, Model &model, const Color *baseMats, float modelSize=0.4f) |
| Draws a player at the given world position. | |
| static void | drawEgg (Vector3 &worldPos, Color teamColor, Model &model, float rotation=0.0f, const Color *baseMats=nullptr, float modelSize=0.3f) |
| Draws an egg at the given world position. | |
| static void | drawResources (const Resources &resources, const std::array< int, 7 > &slotIndices, const std::array< float, 7 > &rotations, const Vector3 &tileCenter, float tileSize, Model &foodModel, float foodModelSize, Model &crystalModel, float crystalModelSize, float baseSize=0.15f) |
| Draws all resources for a tile using precomputed slot indices. | |
Static Private Member Functions | |
| static void | _restoreModelBaseColors (Model &model, const Color *baseMats, int count=6) |
Helper class for rendering game entities (players, eggs, resources).
Definition at line 11 of file EntityRenderer.hpp.
|
staticprivate |
Definition at line 76 of file EntityRenderer.cpp.
Referenced by drawEgg(), and drawPlayer().
Here is the caller graph for this function:
|
static |
Draws an egg at the given world position.
| worldPos | World position to draw at. |
| teamColor | Color for the egg's team. |
| modelSize | Size scalar for the model. |
Definition at line 32 of file EntityRenderer.cpp.
References _restoreModelBaseColors().
Referenced by RaylibRenderer::_render3D().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Draws a player at the given world position.
| worldPos | World position to draw at. |
| teamColor | Color for the player's team. |
| modelSize | Size scalar for the model. |
Definition at line 8 of file EntityRenderer.cpp.
References _restoreModelBaseColors(), ColorPalette::SlimePalette::blush, ColorPalette::colorEquals(), ColorPalette::getSlimePalette(), ColorPalette::SlimePalette::inner, ColorPalette::KEEP, and ColorPalette::SlimePalette::outer.
Referenced by RaylibRenderer::_render3D().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Draws all resources for a tile using precomputed slot indices.
| resources | The resources to draw. |
| slotIndices | Slot index per resource type (0-7), or -1 if absent. |
| tileCenter | World position of tile center. |
| tileSize | Size of a tile in world units. |
| baseSize | Base size of resource models. |
Definition at line 45 of file EntityRenderer.cpp.
References ColorPalette::getResourceColor(), and TileSlotMap::slotOffset().
Referenced by RaylibRenderer::_render3D().
Here is the call graph for this function:
Here is the caller graph for this function: