17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 23:16:22 +01:00

feat(editor): far out the top view shows the base map of OpenStreetMap from geoportal.gov.pl in place of the imagery, tiles as large as the view needs, the ground not drawn under it nor streamed as far as the view; the tracks over it in the colour of the rails, blue by default, and the joints of the pieces left out far out

This commit is contained in:
maj00r
2026-10-23 13:35:07 +02:00
parent a892532fda
commit 5e846018b6
10 changed files with 229 additions and 22 deletions

View File

@@ -598,7 +598,7 @@ void terrain_streamer::update(glm::dvec3 const &Camera)
}
// the top view of the tracks wants the terrain as far as the corners of the screen, as fine as its pixels need
auto const top{Global.EditorOrtho && Global.editor_tracks};
auto const top{Global.EditorOrtho && Global.editor_tracks && false == Global.EditorOrthoMap};
auto const aspect{Global.window_size.x / std::max(1.0, static_cast<double>(Global.window_size.y))};
auto const reach{top ? Global.EditorOrthoExtent * std::sqrt(1.0 + aspect * aspect) : 0.0};
m_pixel = top ? 2.0 * Global.EditorOrthoExtent / std::max(1, Global.window_size.y) : 0.0;