载入中...
搜索中...
未找到
TileProjection.h
浏览该文件的文档.
1#pragma once
2
4#include "map/TileLayer.h"
5
6namespace eve::map {
7
9void tileToWorld(const TileLayer::Config &cfg, int tx, int ty, float &wx, float &wy);
11float tileToDepthY(const TileLayer::Config &cfg, int tx, int ty);
13void worldToTile(const TileLayer::Config &cfg, float wx, float wy, int &tx, int &ty);
14
15} // namespace eve::map
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
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.
void worldToTile(const TileLayer::Config &cfg, float wx, float wy, int &tx, int &ty)
Converts world pixels back to the containing tile index.
float tileToDepthY(const TileLayer::Config &cfg, int tx, int ty)
Painter's-algorithm depth for the tile under the layer's projection.