fix(vtk): 底图覆盖半径3->4治近距旋转黑边; 纹理加mipmap+各向异性16x+edgeClamp治潜在糊/接缝渗色

This commit is contained in:
gaozheng 2026-06-17 11:47:03 +08:00
parent 5f27e59685
commit a4866de68c
1 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,7 @@ namespace geopro::app {
namespace {
// 天地图 WMTS 令牌(与轨迹图 trajectory_map.html 同源)。
const char* kTk = "aca91d8c9f59a4f779f39061b8a07737";
constexpr int kRadius = 3; // 中心瓦片 ±3 → 最多 7x7=49 块,留平移余量
constexpr int kRadius = 4; // 中心瓦片 ±4 → 最多 9x9=81 块,留旋转/平移余量(治近距旋转黑边)
constexpr int kMinZoom = 3;
constexpr int kMaxZoom = 18;
constexpr double kGroundZ = 0.0; // 底图置于 z=0 地面参考(剖面深度向下为负,落其下)
@ -80,7 +80,10 @@ vtkSmartPointer<vtkTexture> makeTexture(const QImage& img) {
}
auto tex = vtkSmartPointer<vtkTexture>::New();
tex->SetInputData(vimg);
tex->InterpolateOn();
tex->InterpolateOn(); // 双线性
tex->MipmapOn(); // 缩小/斜视不闪烁、不糊
tex->SetMaximumAnisotropicFiltering(16); // 斜视角下纹理保持清晰
tex->EdgeClampOn(); // 边缘夹紧,避免相邻瓦片接缝渗色
return tex;
}