17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 03:27:30 +01:00

feat(editor): the design speed the norms lay for is shown by the cursor with the track it comes from, and can be the one set for the laying

Laid to the norms, the readout says the design speed of the transition curves and of the cant: that of the track the laying goes on from or joins, or the one set for the laying. A new option takes the set speed also on from a track with its own, the new tracks get it; Ctrl+Shift+wheel steps it while laying and turns the option on. The panel shows the speed the laying under way is designed for.
This commit is contained in:
maj00r
2026-10-21 20:28:34 +02:00
parent 415c7484ec
commit 9fedbaf6a8
6 changed files with 105 additions and 12 deletions

View File

@@ -1341,6 +1341,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri
double piece_length{100.0};
bool copy_selected{false};
editor_track::path_style style;
bool own_speed{false}; // the speed of the style also where the track goes on from one with its own, the new tracks given it
std::string status;
double status_time{-100.0};
std::string skew; // what Alt turned the straight to
@@ -1501,6 +1502,12 @@ class editor_mode : public application_mode, private editor_track::observer, pri
std::string track_shaping(bool const Joined) const;
void render_layout_combo();
double design_speed(TTrack const *From, TTrack const *To) const;
// the track whose speed the design takes, none where it's the one set for the laying
TTrack const *speed_track(TTrack const *From, TTrack const *To) const;
// the tracks the laying under way goes on from and to
std::pair<TTrack const *, TTrack const *> laying_ends() const;
std::string design_speed_of(TTrack const *From, TTrack const *To) const;
void give_own_speed(std::vector<TTrack *> const &Created) const;
std::vector<segment_data> join_pieces(TTrack const *From, editor_track::point_ref const &Frompoint, glm::dvec3 const &Start, glm::dvec2 const &Direction, editor_track::snap_target const &End, double &Length,
std::string &Error) const;
double m_extend_length{25.0};