Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
RenderingHelper Class Reference

#include <RenderingHelper.hpp>

+ Collaboration diagram for RenderingHelper:

Static Public Member Functions

static Vector3 tileToWorld (int tileX, int tileY, int worldWidth, int worldHeight, float tileSize)
 Converts tile coordinates to world coordinates (centered on tile).
 

Detailed Description

Definition at line 5 of file RenderingHelper.hpp.

Member Function Documentation

◆ tileToWorld()

Vector3 RenderingHelper::tileToWorld ( int  tileX,
int  tileY,
int  worldWidth,
int  worldHeight,
float  tileSize 
)
static

Converts tile coordinates to world coordinates (centered on tile).

Parameters
tileXTile X coordinate.
tileYTile Y coordinate.
worldWidthTotal world width in tiles.
worldHeightTotal world height in tiles.
tileSizeSize of each tile in world units.
Returns
World position at center of tile (y=0).
Note
This assumes the world is centered at (0,0) in world space.

Definition at line 3 of file RenderingHelper.cpp.

Referenced by GameState::_applyEggNew(), GameState::_applyPlayerNew(), GameState::_applyServerSpawnedEgg(), RaylibRenderer::_drawSelectionHighlight(), RaylibRenderer::_groupLabelAnchor(), RaylibRenderer::_render3D(), SelectionFinder::findFromRay(), and MoveBehavior::MoveBehavior().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: