17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 11:39:14 +01:00

feat(editor): track gizmo rings along the track: direction, grade and cant

The rotate gizmo stands along the track. The cross ring changes the grade about the middle or the selected
end, the joined tracks take the grade at the joints; the ring along the track changes the cant of the track
or of the selected end, the joined tracks take it at the joints and ramp it. On a control vector the cross
ring tilts it up or down. Ctrl steps by 5 degrees, 1 per mille, 5 mm.
This commit is contained in:
maj00r
2026-10-11 13:22:47 +02:00
parent b486eb33d5
commit a756beb34b
6 changed files with 225 additions and 26 deletions

View File

@@ -116,6 +116,7 @@ class editor_track
static std::vector<joint> joints(TTrack const &Track);
// moves the joined ends to where the ends of the track are now, turning them as the track turned there
static void follow(TTrack const &Track, std::vector<joint> const &Joints);
static void follow_grade(TTrack const &Track, std::vector<joint> const &Joints);
static std::vector<int> hold_controls(TTrack &Track);
static void settle_controls(TTrack &Track, std::vector<int> const &Paths);
static std::vector<std::pair<TTrack *, point_ref>> partners(TTrack &Track, point_ref const &End);