feat(editor): road flattener tool alongside river carver

- River/Road Carver section now has two modes:
  - River: carves a channel below terrain (existing)
  - Road: flattens terrain to interpolated height between start/end
- Road mode smoothly transitions height along the path with quadratic
  falloff at edges for natural embankment shape
- Set Start → Set End + Apply workflow works for both modes
- Roads follow terrain slope by interpolating between start/end heights
- Pair with Paint mode to add cobblestone/dirt texture on the road
This commit is contained in:
Kelsi 2026-05-05 06:37:54 -07:00
parent d253aed635
commit 3ac40d27ad
3 changed files with 71 additions and 17 deletions

View file

@ -75,6 +75,9 @@ public:
// Carve a river/path between two points (lowers terrain along line)
void carveRiver(const glm::vec3& start, const glm::vec3& end, float width, float depth);
// Flatten a road between two points (smooths to average height along path)
void flattenRoad(const glm::vec3& start, const glm::vec3& end, float width);
// Import/export heightmap (raw 16-bit grayscale, 129x129)
bool importHeightmap(const std::string& path, float heightScale);
bool exportHeightmap(const std::string& path, float heightScale);