mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 23:57:28 +01:00
feat(editor): the terrain of a scenery begun from nothing grows where the track is laid
The terrain model was made once around the camera when a new scenery took it; tracks laid on past it went over nothing. While a track is laid or dragged out, the chunks missing within 400 m of the cursor are now made from the model too, the nearest first, in a scenery with the heightmap terrain placed on the map. The formations aren't made anew after such chunks. A chip in the terrain panel turns it off.
This commit is contained in:
@@ -345,6 +345,9 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
std::size_t samples{0};
|
||||
double band{300.0}; // m from the tracks the chunks made along them reach
|
||||
bool shape{true}; // the formation and the slopes of the tracks as modifiers of the terrain
|
||||
bool grow{true}; // while a track is laid, the terrain is made around the cursor where there's none
|
||||
bool grown{false}; // the chunks waiting were all asked for by growing: the formations aren't made anew after them
|
||||
double grow_time{-10.0};
|
||||
double slope{1.5};
|
||||
double reach{60.0};
|
||||
std::vector<heightmap::chunk_key> pending; // chunks to make once their model is in
|
||||
@@ -406,6 +409,7 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
// of the modifiers laid
|
||||
std::size_t nmt_shape_tracks(std::vector<TTrack *> const *Only = nullptr);
|
||||
void nmt_update();
|
||||
void nmt_grow();
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user