17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 06:24:27 +01: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

@@ -295,6 +295,13 @@ class terrain_streamer
bool m_hascamera{false};
std::vector<chunk_key> m_ring; // offsets of the chunks around a point, the nearest first
int m_ringradius{-1};
double m_pixel{0.0}; // metres a pixel of the top view spans; none in the 3D view
// the last walk over the chunks around the camera, and whether it found nothing more to ask for
bool m_settled{false};
chunk_key m_walkhere{0, 0};
chunk_key m_walkthere{0, 0};
int m_walkradius{0};
double m_walktime{0.0};
// shared with the workers, guarded by m_mutex
std::mutex m_mutex;