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

feat(editor): an end of a track dragged, and an end of a straight dragged by its handle, goes onto the ground at the height of the ballast, as a point laid; with Shift held it keeps its height

Selftest trackends: the ends of a track against the ground under them.
This commit is contained in:
maj00r
2026-10-24 18:45:47 +02:00
parent 9625b4b3d9
commit 11d1342181
7 changed files with 42 additions and 6 deletions

View File

@@ -1730,7 +1730,8 @@ class editor_mode : public application_mode, private editor_track::observer, pri
};
handle_drag m_handle_drag;
void handle_drag_start(glm::dvec3 const &Anchor);
bool handle_drag_step(glm::dvec3 &Position);
// Ground: the handle goes onto the ground, at the height of the ballast of the track, unless Shift is held
bool handle_drag_step(glm::dvec3 &Position, TTrack const *Ground = nullptr);
void point_drag_start(editor_track::point_ref const &Point);
void point_drag_update();
void point_drag_finish();