GETileAtlas
Maps block type IDs to UV rects in object-m.png via Easy3D::TextureAtlas.
Overview
Wraps an Easy3D::TextureAtlas sized to the sheet dimensions
kSheetW × kSheetH = 1301 × 1431 (object-m.png), registered as one
grid via AddGrid with kTileSize = 64, kSheetCols = 20,
and kSheetGap = 1 (65 px pitch: 64 px icon + 1 px inter-tile gap — confirmed
against mobile-eggbert's Pixmap::GetSrcRectangle).
Sources: src/GalaxyEggbertCNA/Game/GETileAtlas.hpp and .cpp.
API
class GETileAtlas {
public:
explicit GETileAtlas(int textureWidth, int textureHeight);
Easy3D::UvRect GetTileUv(uint16_t blockType) const;
};
GetTileUv(blockType)
Returns an all-zero UvRect for blockType <= 0 (Air); otherwise
looks up "tile_<blockType>" in the atlas. BlockTypes::tileUV()
(in BlockTypes.hpp) independently computes the same rect with a half-pixel inset
to avoid seam bleeding, and is cross-checked against this class.
Dependencies
Easy3D::TextureAtlas only.