Modyfing terain

Hi



I have created terrain in monkey world 3d. Next I have imported it to my project. Is it possible to modify (during running the program, for example if I press some key in the game) this terrain, for example if I want to scale down some peak.



Are such operations possible?



Or maybe where I can find information about merging two objects?



Best Regards

Zbiszko




Find the vertex you want:

if you have access to the terrainPage you can just call:


        page.setHeightMapValue( cellX, cellY, value );



then just update the terrain:

 
public void refreshTerrainGeometry() {

                    page.updateFromHeightMap();
                    page.fixNormals();

                    page.updateModelBound();
                    page.updateGeometricState( 0, true );

                    CollisionTreeManager.getInstance().updateCollisionTree( page );
    }


(this part needs to be done from the openGL thread...)