diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java index 048a816f5..c1aa98dbd 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java @@ -1285,6 +1285,19 @@ public class TerrainEditorController { return levelTerrainDesiredHeight; } + /** + * Smooth bumps in the terrain by averaging the height in the tool radius. + * The smoothAmount affects how many neighbour points are averaged, The smaller + * the value, then only the smaller bumps will disappear. A large value will + * smooth larger hills + * @param markerLocation + * @param heightToolRadius + * @param smoothAmount + */ + protected void doSmoothTerrain(Vector3f markerLocation, float heightToolRadius, float smoothAmount) { + + } + diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form index b7a0b5ade..4d081aef3 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form @@ -538,12 +538,18 @@ + + + + + + diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java index 1f0391101..c309651c1 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java @@ -481,8 +481,10 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce roughTerrainButton.setEnabled(false); jToolBar1.add(roughTerrainButton); + terrainModButtonGroup.add(levelTerrainButton); levelTerrainButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/terraineditor/icon_terrain-level.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(levelTerrainButton, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.levelTerrainButton.text")); // NOI18N + levelTerrainButton.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.levelTerrainButton.toolTipText")); // NOI18N levelTerrainButton.setFocusable(false); levelTerrainButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); levelTerrainButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainToolController.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainToolController.java index fc5a66228..f1e1d1bce 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainToolController.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainToolController.java @@ -69,6 +69,7 @@ public class TerrainToolController extends SceneToolController { private float heightToolRadius; private float heightAmount; private float levelAmount; + private float smoothAmount; private float paintAmount; private int selectedTextureIndex = -1; @@ -257,7 +258,7 @@ public class TerrainToolController extends SceneToolController { editorController.doModifyTerrainHeight(getMarkerLocation(), heightToolRadius, -heightAmount); } else if (TerrainEditButton.smoothTerrain == getCurrentEditButtonState() ) { - + editorController.doSmoothTerrain(getMarkerLocation(), heightToolRadius, smoothAmount); } else if (TerrainEditButton.levelTerrain == getCurrentEditButtonState() ) { if (editorController.doGetLevelTerrainDesiredHeight() == null) {