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

feat(editor): the track laid on the terrain gets its grade line from the profile solver

In place of a line bent every ten metres to keep within 0.1 m of every bump,
the grades and the vertical curves are fitted to the ground the way the
profile fits them. Where the formation is made in the terrain model the line
keeps to the radius of the norms and cuts and fills; over the ground left as
it is it bends as sharply as it has to. The joints keep the height and the
grade of the track joined, no grade is capped and no piece is under 5 m.
This commit is contained in:
maj00r
2026-10-21 13:20:47 +02:00
parent eea0900928
commit d2d06817bc
5 changed files with 120 additions and 48 deletions

View File

@@ -406,6 +406,8 @@ class editor_mode : public application_mode, private editor_track::observer, pri
void nmt_follow_tracks();
// the height the ground will have where the terrain is made ahead of the track laid and isn't there yet
bool nmt_ahead(double const X, double const Z, double &Height) const;
// a track laid through the points gets its formation from the terrain of the model: it needn't keep to every bump of it
bool nmt_formed(std::vector<glm::dvec2> const &Points) const;
// the squares of the model under the rectangle are in, none of them waiting to be asked for again
bool nmt_ready(glm::dvec2 const &Min, glm::dvec2 const &Max);
// Only: the paths of these tracks are shaped anew, the modifiers of those removed taken away; null: all of them. the number