17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-21 01:36:02 +02:00

feat(editor): the top view of the tracks draws the terrain to the corners of the screen, the ballast optional

- In the top view of the tracks work area, the renderer's reach is the half diagonal of the screen. It used to be three extents, which cut wide windows short.
- Cells far from the camera no longer draw only their tracks: the terrain shapes are drawn too. Models keep their own ranges.
- In that view, the heightmap streamer loads chunks as far as the corners, up to 50 km. The detail comes from the size of a pixel, not from the distance.
- The walk over the chunks around the camera is skipped while it would ask for nothing, so a wide reach costs little.
- A setting, kept in the editor settings, leaves out the ballast of the railway in the top view, so the ground under the tracks shows. It is in the View menu and next to the extent slider.
- Self-test: ortho <extent> [noballast|ballast], orthophoto off.
This commit is contained in:
maj00r
2026-10-19 17:10:27 +02:00
parent 97be54e688
commit d1dbd40566
11 changed files with 128 additions and 11 deletions

View File

@@ -108,6 +108,8 @@ bool editorSettings::load()
m_terrain_offer = (value == "1");
else if (key == "track_tools_all")
m_track_tools_more = (value == "1");
else if (key == "top_ballast")
m_top_ballast = (value == "1");
else if (key.rfind(origin_prefix, 0) == 0)
{
// northing;easting
@@ -154,6 +156,7 @@ bool editorSettings::save()
stream << "first_steps " << (m_first_steps ? 1 : 0) << "\n";
stream << "terrain_offer " << (m_terrain_offer ? 1 : 0) << "\n";
stream << "track_tools_all " << (m_track_tools_more ? 1 : 0) << "\n";
stream << "top_ballast " << (m_top_ballast ? 1 : 0) << "\n";
stream << std::fixed << std::setprecision(3);
for (auto const &origin : m_orthophoto_origins)
stream << origin.first << " " << origin.second.first << ";" << origin.second.second << "\n";