载入中...
搜索中...
未找到
GridProjection.h
浏览该文件的文档.
1#pragma once
2
3#include "grid/GridConfig.h"
4
5#include <cstdint>
6#include <functional>
7#include <vector>
8
9namespace eve::grid {
10
12void cellToWorld(const GridConfig &cfg, int cx, int cy, float &px, float &py);
13
15float cellToDepthY(const GridConfig &cfg, int cx, int cy);
16
21void worldToCell(const GridConfig &cfg, float px, float py, int &cx, int &cy,
22 int mapW = 1, int mapH = 1);
23
29void foreachRotatedFootprint(int w, int h, const std::vector<uint8_t> &mask, int steps,
30 bool hexMode,
31 const std::function<void(int lx, int ly)> &fn);
32
34void rotatedFootprintSize(int w, int h, const std::vector<uint8_t> &mask, int steps,
35 bool hexMode, int &outW, int &outH);
36
37} // namespace eve::grid
float cx
Definition CardTypes.cpp:31
float cy
Definition CardTypes.cpp:32
int h
int w
std::vector< Colorf > px
SettlementPipeline::Stage fn
void cellToWorld(const GridConfig &cfg, int cx, int cy, float &px, float &py)
void worldToCell(const GridConfig &cfg, float px, float py, int &cx, int &cy, int mapW, int mapH)
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)
float cellToDepthY(const GridConfig &cfg, int cx, int cy)
void rotatedFootprintSize(int w, int h, const std::vector< uint8_t > &mask, int steps, bool hexMode, int &outW, int &outH)