feat/vtk-3d-view #7
|
|
@ -234,7 +234,9 @@ void TileBasemap::refineTile(int z, int x, int y, std::set<long long>& out, int&
|
|||
const double dist = std::max(1.0, std::sqrt(dx * dx + dy * dy + dz * dz));
|
||||
screenPx = g * projK_ / dist; // 透视:projK_ = H/(2·tan(vfov/2))
|
||||
}
|
||||
if (screenPx > kTargetPx && z < kMaxZoom) {
|
||||
// 细分条件:屏幕上太大 → 细分(近细远粗);或瓦片本身比允许范围还大 → 也强制细分,
|
||||
// 否则拉到最远时一块巨瓦(如 78km)正好盖住数据中心、过不了距离剔除 → 覆盖超大面积。
|
||||
if ((screenPx > kTargetPx || g > maxTileDist_) && z < kMaxZoom) {
|
||||
refineTile(z + 1, 2 * x, 2 * y, out, count);
|
||||
refineTile(z + 1, 2 * x + 1, 2 * y, out, count);
|
||||
refineTile(z + 1, 2 * x, 2 * y + 1, out, count);
|
||||
|
|
|
|||
Loading…
Reference in New Issue