17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 02:17:28 +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

@@ -1570,6 +1570,10 @@ class editor_mode : public application_mode, private editor_track::observer, pri
track_hover split_spot() const;
void update_track_hover();
void draw_track_lines() const;
// what the colours of the tracks in the view tell
enum class track_colouring { plain, radius, speed, grade };
track_colouring m_track_colouring{track_colouring::plain};
void draw_track_legend() const;
void draw_track_hover() const;
struct track_intent
{