mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 08:30:28 +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:
@@ -657,6 +657,15 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
glm::dvec3 fixed{0.0};
|
||||
std::vector<std::pair<TTrack *, std::vector<int>>> held;
|
||||
std::vector<TTrack *> extra;
|
||||
int ring{-1};
|
||||
glm::dmat3 basis{1.0};
|
||||
glm::dvec3 pivot{0.0};
|
||||
double grade{0.0};
|
||||
double roll{0.0};
|
||||
double roll0{0.0};
|
||||
double pivot_chainage{0.0};
|
||||
std::vector<double> chainages;
|
||||
std::vector<double> lengths;
|
||||
};
|
||||
track_gizmo_drag m_track_gizmo_drag;
|
||||
gizmo_operation track_gizmo_operation(TTrack const &Track, bool const Pointmode) const;
|
||||
@@ -666,7 +675,7 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
void track_gizmo_stretch(TTrack &Track, double const Length);
|
||||
void track_gizmo_control(TTrack &Track, glm::dvec3 Control);
|
||||
void track_gizmo_begin(TTrack &Track, bool const Pointmode, gizmo_operation const Operation);
|
||||
void track_gizmo_turn(TTrack &Track, double const Angle);
|
||||
void track_gizmo_turn(TTrack &Track, int const Axis, double const Angle);
|
||||
void track_gizmo_length(TTrack &Track, double Length);
|
||||
void track_gizmo_end(TTrack &Track);
|
||||
bool m_track_dirty{false};
|
||||
|
||||
Reference in New Issue
Block a user