feat(editor): rotate terrain 90 degrees clockwise

- Rotate 90 CW button in Mirror/Rotate section
- Snapshots outer vertex heights into 129x129 grid, rotates in-place,
  writes back with inner vertices averaged from surrounding outers
- Useful for reorienting terrain features or creating rotational
  symmetry (rotate + mirror for 4-way symmetric arenas)
This commit is contained in:
Kelsi 2026-05-05 08:32:59 -07:00
parent 66b6404d25
commit 14d305a477
3 changed files with 53 additions and 1 deletions

View file

@ -627,7 +627,11 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "Set start then end to apply");
}
if (ImGui::CollapsingHeader("Mirror Terrain")) {
if (ImGui::CollapsingHeader("Mirror / Rotate")) {
if (ImGui::Button("Rotate 90 CW", ImVec2(-1, 0))) {
app.getTerrainEditor().rotateTerrain90();
app.showToast("Terrain rotated 90 degrees");
}
if (ImGui::Button("Mirror X (Left<>Right)", ImVec2(-1, 0))) {
app.getTerrainEditor().mirrorX();
app.showToast("Terrain mirrored X");