Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
RenderingHelper.cpp
Go to the documentation of this file.
1
#include "
RenderingHelper.hpp
"
2
3
Vector3
RenderingHelper::tileToWorld
(
int
tileX,
int
tileY,
int
worldWidth,
int
worldHeight,
4
float
tileSize)
5
{
6
float
worldX = (tileX - worldWidth / 2.0f) * tileSize + tileSize / 2.0f;
7
float
worldZ = (tileY - worldHeight / 2.0f) * tileSize + tileSize / 2.0f;
8
return
{worldX, 0.0f, worldZ};
9
}
RenderingHelper.hpp
RenderingHelper::tileToWorld
static Vector3 tileToWorld(int tileX, int tileY, int worldWidth, int worldHeight, float tileSize)
Converts tile coordinates to world coordinates (centered on tile).
Definition
RenderingHelper.cpp:3
gui
src
renderer
raylib_helpers
RenderingHelper.cpp
Generated by
1.9.8