载入中...
搜索中...
未找到
TileProjection.cpp
浏览该文件的文档.
Module-neutral grid topology and sizing (no building/map dependency).
Pure cell/world projection helpers for GridConfig.
void worldToCell(const GridConfig &cfg, float px, float py, int &cx, int &cy, int mapW, int mapH)
Maps planar coordinates to the nearest cell. Staggered/hex layouts use a bounded nearest-neighbor sea...
Definition GridProjection.cpp:69
float cellToDepthY(const GridConfig &cfg, int cx, int cy)
2D sort key (cell foot Y), matching map::tileToDepthY semantics. Unused on the XZ plane.
Definition GridProjection.cpp:63
@ Hexagon
@ Isometric
@ Rectangle
@ Staggered
void cellToWorld(const GridConfig &cfg, int cx, int cy, float &px, float &py)
Maps a cell to planar coordinates (px, py). On XY plane these are world (x, y); on XZ plane they are ...
Definition GridProjection.cpp:30
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
Definition PlacementWorld.h:19
@ Hexagonal
@ Orthogonal
@ Isometric
@ Staggered
void worldToTile(const TileLayer::Config &cfg, float wx, float wy, int &tx, int &ty)
Converts world pixels back to the containing tile index.
Definition TileProjection.cpp:49
void tileToWorld(const TileLayer::Config &cfg, int tx, int ty, float &wx, float &wy)
Converts a tile index to world pixels using the layer's projection.
Definition TileProjection.cpp:41
float tileToDepthY(const TileLayer::Config &cfg, int tx, int ty)
Painter's-algorithm depth for the tile under the layer's projection.
Definition TileProjection.cpp:45