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

fix(editor): a switch takes the cant set by the gizmo on a track joined to it

Canting a track at its joint with a switch cants the whole switch, its diverging path goes onto the new cone,
and the tracks joined at the other ends of the switch follow it and take the cant at their joints.
This commit is contained in:
maj00r
2026-10-11 14:08:47 +02:00
parent c722e4e419
commit fe9d78b172
2 changed files with 67 additions and 8 deletions

View File

@@ -666,6 +666,15 @@ class editor_mode : public application_mode, private editor_track::observer
double pivot_chainage{0.0};
std::vector<double> chainages;
std::vector<double> lengths;
struct switch_joint
{
TTrack *track{nullptr};
editor_track::point_ref own;
editor_track::point_ref theirs;
double roll{0.0};
std::vector<editor_track::joint> joints;
};
std::vector<switch_joint> switches;
};
track_gizmo_drag m_track_gizmo_drag;
gizmo_operation track_gizmo_operation(TTrack const &Track, bool const Pointmode) const;