载入中...
搜索中...
未找到
GridProjection.h
浏览该文件的文档.
21EVENGINE_API_FOUNDATION void cellToWorld(const GridConfig &cfg, int cx, int cy, float &px, float &py);
34EVENGINE_API_FOUNDATION void worldToCell(const GridConfig &cfg, float px, float py, int &cx, int &cy, int mapW = 1,
43EVENGINE_API_FOUNDATION void foreachRotatedFootprint(int w, int h, const std::vector<uint8_t> &mask, int steps,
47EVENGINE_API_FOUNDATION void rotatedFootprintSize(int w, int h, const std::vector<uint8_t> &mask, int steps,
Module-neutral grid topology and sizing (no building/map dependency).
Definition PlacementWorld.h:23
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
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
void rotatedFootprintSize(int w, int h, const std::vector< uint8_t > &mask, int steps, bool hexMode, int &outW, int &outH)
Axis-aligned size of a footprint after rotation.
Definition GridProjection.cpp:187
void foreachRotatedFootprint(int w, int h, const std::vector< uint8_t > &mask, int steps, bool hexMode, const std::function< void(int lx, int ly)> &fn)
Enumerates local cells of a rotated footprint.
Definition GridProjection.cpp:121