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

feat(editor): the tracks laid on the terrain model go onto it as the tracks going onto the terrain do, the chain laid since the laying began fitted again at each click, with the tracks around kept and met; a straight or an arc cut by the fit before made one again, a path cut only where it would part from the line by more than 3 cm; a choice of the heights while laying: fitted, from point to point, level, kept in the settings; the fit taken back with its click

This commit is contained in:
maj00r
2026-10-23 15:55:58 +02:00
parent 7c0b3bc858
commit 4d2f95aa43
11 changed files with 392 additions and 90 deletions

View File

@@ -76,6 +76,16 @@ public:
};
track_norms norms() const { return m_norms; }
void norms(track_norms Norms) { m_norms = Norms; }
// the heights of the tracks laid on the ground: fitted to it as the tracks go onto the terrain, the points clicked on it with
// even grades between them, level
enum class lay_heights
{
fitted,
points,
level
};
lay_heights heights() const { return m_heights; }
void heights(lay_heights Heights) { m_heights = Heights; }
private:
movement_scheme m_movement{movement_scheme::wsad};
@@ -92,6 +102,7 @@ private:
int m_top_tracks{0}; // the railway in the top view: whole, without the ballast, the rails alone
std::uint32_t m_top_rails{0xffff6e28}; // colour of the rails alone, as ImGui keeps it: ABGR
track_norms m_norms{track_norms::ask};
lay_heights m_heights{lay_heights::fitted};
};
// global editor settings instance