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

feat(editor): a scenery begun from nothing is asked for its terrain as the first track is laid

With the lay tool on, a scenery with no tracks nor terrain chunks gets the offer of the terrain model and the aerial photos
around the camera; without a place yet it asks for the PUWG 1992 coordinates of this point, as geoportal.gov.pl gives them,
and keeps them as the place of its orthophoto. The offer can be turned off (editor setting terrain_offer). Self-test
nmtoffer.
This commit is contained in:
maj00r
2026-10-18 13:02:01 +02:00
parent 5af699fba4
commit 5a00d88be9
7 changed files with 129 additions and 0 deletions

View File

@@ -348,6 +348,10 @@ class editor_mode : public application_mode, private editor_track::observer
std::size_t shaped{0};
std::string status;
std::string error;
bool offered{false}; // the terrain was offered to the scenery begun without it
bool prompt{false}; // the offer is shown
double north{0.0}; // the place typed into the offer, PUWG 1992
double east{0.0};
};
editor_nmt m_nmt;
nmt_state m_nmt_state;
@@ -362,6 +366,10 @@ class editor_mode : public application_mode, private editor_track::observer
void nmt_shape_tracks();
void nmt_update();
void render_nmt_ui();
// a scenery begun from nothing, with no tracks nor terrain, is asked as the first track is laid whether it wants the terrain
void nmt_offer();
void render_nmt_prompt();
void nmt_accept_offer();
// the tool of the terrain the left mouse button works
enum class terrain_tool
{