17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-10 17:13:18 +01:00

feat(editor): the tracks of the track mode can be coloured by their radius, speed or grade, with a legend

View > Track colours draws the rail tracks over the view in bands of the radius of their paths, of their speed or of the grade
along them, from above over the whole view and in the 3D view within 1.5 km of the camera, with the legend of the bands in
the bottom right corner. Plain keeps the lines of the top view as they were. Self-test command trackcolours.
This commit is contained in:
maj00r
2026-10-21 17:47:42 +02:00
parent 27ea2a7456
commit 6a5f0d735d
5 changed files with 125 additions and 4 deletions

View File

@@ -396,6 +396,13 @@ editor_mode::selftest_result editor_mode::selftest_track(std::string const &comm
WriteLog(format("SELFTEST vprofile zone %.3f %.3f %s", zone.from, zone.to, zone.name.c_str()));
return selftest_result::handled;
}
if (command == "trackcolours")
{
int colouring{0};
words >> colouring;
m_track_colouring = static_cast<track_colouring>(std::clamp(colouring, 0, 3));
return selftest_result::handled;
}
if (command == "vprofilerun" || command == "vprofiledel" || command == "vprofileput")
{
// the grade line of the line through a track, a point of it taken out as with Del, the line applied