mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 07:20:22 +01:00
feat(editor): track gizmo turns, lengthens and edits the control vectors, joined tracks keep the tangent
W turns the track (about its middle or the selected end) and a selection of tracks, the joined tracks follow. E lengthens the track at its free end: a straight stays straight, an arc keeps its radius, cant and grade. The gizmo on a control point moves, turns or lengthens the vector; the control point of the track joined there turns with it, at a switch the vector only slides along the switch. Straight neighbours dragged along keep their tangents and become straight again when nothing bent them.
This commit is contained in:
@@ -116,6 +116,11 @@ 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 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);
|
||||
static void align_controls(TTrack const &Track, point_ref const &Control, std::vector<std::pair<TTrack *, point_ref>> const &Partners);
|
||||
static point_ref end_of(point_ref const &Control);
|
||||
|
||||
struct snap_target
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user