#include <Terrain.h>
Public Member Functions | |
void | SetParamFile (const char *fname) |
bool | LoadParams () |
vtString | GetParamFile () |
void | SetParams (const TParams &Params) |
TParams & | GetParams () |
void | SetName (const vtString &str) |
vtString | GetName () |
void | SetLocalGrid (vtElevationGrid *pGrid, bool bPreserve) |
void | SetTin (vtTin3d *pTin) |
vtTin3d * | GetTin () |
bool | GetGeoExtentsFromMetadata () |
void | SetBothSides (bool bFlag) |
pass true to draw the underside of the terrain as well | |
void | CreateStep0 () |
bool | CreateStep1 () |
bool | CreateStep2 (vtTransform *pSunLight, vtLightSource *pLightSource) |
bool | CreateStep3 () |
bool | CreateStep4 () |
bool | CreateStep5 () |
vtString | GetLastError () |
void | SetProgressCallback (ProgFuncPtrType progress_callback=NULL) |
bool | ProgressCallback (int i) |
void | SetTextureColors (ColorMap *colors) |
Set the colors to be used in a derived texture. More... | |
ColorMap * | GetTextureColors () |
void | SetTextureContours (float fInterval, float fSize) |
Sets the texture colors to be a set of black contour stripes. More... | |
virtual void | PaintDib (bool progress_callback(int)=NULL) |
bool | IsCreated () |
Return true if the terrain has been created. | |
void | Enable (bool bVisible) |
Set the enabled state of the terrain (whether it is shown or not). | |
vtTransform * | LoadModel (const char *filename, bool bAllowCache=true) |
Load an external geometry file. More... | |
void | addNode (osg::Node *pNode) |
Add a model (or any node) to the terrain. More... | |
void | removeNode (osg::Node *pNode) |
Remove a node from the terrain's scene graph. More... | |
void | PlantModel (vtTransform *model) |
Place a model on the terrain. More... | |
void | PlantModelAtPoint (vtTransform *model, const DPoint2 &pos) |
Place a model on the terrain at a specific point. More... | |
bool | PointIsInTerrain (const DPoint2 &p) |
Test whether a given point is within the current terrain. More... | |
void | SetGlobalProjection () |
bool | AddFence (vtFence3d *f) |
void | AddFencepoint (vtFence3d *f, const DPoint2 &epos) |
void | RedrawFence (vtFence3d *f) |
void | AddRoute (vtRoute *f) |
void | add_routepoint_earth (vtRoute *f, const DPoint2 &epos, const char *structname) |
void | RedrawRoute (vtRoute *f) |
void | SaveRoute () |
vtRoute * | GetLastRoute () |
vtRouteMap & | GetRouteMap () |
LayerSet & | GetLayers () |
Get at the container for all the layers. | |
void | RemoveLayer (vtLayer *lay, bool progress_callback(int)=NULL) |
vtLayer * | LoadLayer (const char *fname) |
bool | AddPlant (const DPoint2 &pos, int iSpecies, float fSize) |
int | DeleteSelectedPlants () |
void | SetPlantList (vtSpeciesList3d *pPlantList) |
vtSpeciesList3d * | GetPlantList () |
vtPlantInstanceArray3d & | GetPlantInstances () |
Get the plant array for this terrain. You can modify it directly. | |
bool | AddNodeToVegGrid (osg::Node *pNode) |
vtStructureLayer * | GetStructureLayer () |
void | SetStructureLayer (vtStructureLayer *slay) |
vtStructureLayer * | NewStructureLayer () |
vtStructureLayer * | LoadStructuresFromXML (const vtString &strFilename) |
void | CreateStructures (vtStructureArray3d *structures) |
bool | CreateStructure (vtStructureArray3d *structures, int index) |
int | DeleteSelectedStructures () |
void | DeleteLayer (uint index) |
bool | FindClosestStructure (const DPoint2 &point, double epsilon, int &structure, double &closest, float fMaxInstRadius, float fLinearWidthBuffer) |
bool | AddNodeToStructGrid (osg::Node *pNode) |
void | RemoveNodeFromStructGrid (osg::Node *pNode) |
vtLodGrid * | GetStructureGrid () |
int | DoStructurePaging () |
vtPagedStructureLodGrid * | GetStructureLodGrid () |
float | GetStructurePageOutDistance () |
void | SetStructurePageOutDistance (float f) |
int | GetStructurePageMax () |
void | ExtendStructure (vtStructure *s) |
void | SetStructureExtension (vtStructureExtension *se=NULL) |
void | SetAbstractLayer (vtAbstractLayer *alay) |
vtAbstractLayer * | GetAbstractLayer () |
void | RemoveFeatureGeometries (vtAbstractLayer *alay) |
int | DeleteSelectedFeatures () |
void | SetFeatureLoader (vtFeatureLoader *loader) |
vtTransform * | GetScaledFeatures () |
vtRoadMap3d * | GetRoadMap () |
virtual void | CreateCustomCulture () |
void | AddEngine (vtEngine *pE) |
void | ActivateEngines (bool bActive) |
vtEngine * | GetEngineGroup () |
FPoint3 | GetCenter () |
float | GetRadius () |
void | SetFeatureVisible (TFType ftype, bool bOn) |
bool | GetFeatureVisible (TFType ftype) |
void | SetLODDistance (TFType ftype, float fDistance) |
float | GetLODDistance (TFType ftype) |
void | SetVerticalExag (float fExag) |
float | GetVerticalExag () const |
vtDynTerrainGeom * | GetDynTerrain () |
const vtDynTerrainGeom * | GetDynTerrain () const |
vtTiledGeom * | GetTiledGeom () |
vtGroup * | GetTopGroup () |
vtGroup * | GetTerrainGroup () |
vtHeightField3d * | GetHeightField () |
vtHeightFieldGrid3d * | GetHeightFieldGrid3d () |
vtProjection & | GetProjection () |
virtual bool | FindAltitudeOnCulture (const FPoint3 &p3, float &fAltitude, bool bTrue, int iCultureFlags) const |
int | GetShadowTextureUnit () |
float | AddSurfaceLineToMesh (vtGeomFactory *pMF, const DLine2 &line, float fOffset, bool bInterp=true, bool bCurve=false, bool bTrue=false) |
void | SetCamLocation (FMatrix4 &mat) |
FMatrix4 & | GetCamLocation () |
vtLocationSaver * | GetLocSaver () |
void | Visited (bool bVisited) |
bool | IsVisited () |
vtAnimContainer * | GetAnimContainer () |
Access the animation paths associated with this terrain. | |
void | SetWaterLevel (float fElev) |
void | SetFog (bool fog) |
bool | GetFog () |
void | SetFogColor (const RGBf &color) |
void | SetFogDistance (float fMeters) |
void | SetBgColor (const RGBf &color) |
RGBf | GetBgColor () |
void | SetShadows (bool shadows) |
bool | GetShadows () |
void | SetShadowOptions (const vtShadowOptions &opt) |
void | GetShadowOptions (vtShadowOptions &opt) |
void | ForceShadowUpdate () |
vtTime | GetInitialTime () |
void | TranslateToGMT (vtTime &time) |
void | TranslateFromGMT (vtTime &time) |
DPoint2 | GetCenterGeoLocation () |
vtGroup * | GetOverlay () |
void | ActivateScenario (int iScenario) |
vtElevationGrid * | GetInitialGrid () |
void | UpdateElevation () |
void | RedrapeCulture (const DRECT &area) |
void | RecreateTextures (vtTransform *pSunLight, bool progress_callback(int)=NULL) |
osg::Image * | GetTextureImage () |
vtMultiTexture * | AddMultiTextureOverlay (vtImage *pImage, const DRECT &extents, int TextureMode) |
osg::Node * | GetTerrainSurfaceNode () |
Public Attributes | |
ProgFuncPtrType | m_progress_callback |
vtStructureExtension * | m_pStructureExtension |
vtContentManager3d | m_Content |
DLine2 | m_Corners_geo |
Protected Member Functions | |
bool | CreateFromTIN () |
bool | CreateFromGrid () |
bool | CreateFromTiles () |
bool | CreateFromExternal () |
void | _CreateCulture () |
void | _CreateVegetation () |
void | _CreateStructures () |
void | _CreateRoads () |
void | _SetupVegGrid (float fLODDistance) |
void | _SetupStructGrid (float fLODDistance) |
void | _CreateAbstractLayers () |
void | _CreateImageLayers () |
void | _CreateTextures (const FPoint3 &light_dir, bool progress_callback(int)=NULL) |
void | _CreateDetailTexture () |
bool | _CreateDynamicTerrain () |
void | _CreateErrorMessage (DTErr error, vtElevationGrid *pGrid) |
void | _SetErrorMessage (const vtString &msg) |
void | CreateArtificialHorizon (float fAltitude, bool bWater, bool bHorizon, bool bCenter) |
void | _ApplyPreLight (vtHeightFieldGrid3d *pLocalGrid, vtBitmapBase *dib, const FPoint3 &light_dir, bool progress_callback(int)=NULL) |
void | _ComputeCenterLocation () |
void | GetTerrainBounds () |
void | EnforcePageOut () |
void | ConnectFogShadow (bool bFog, bool bShadow) |
Protected Attributes | |
vtGroupPtr | m_pContainerGroup |
vtGroupPtr | m_pTerrainGroup |
vtGroupPtr | m_pUnshadowedGroup |
vtDynTerrainGeomPtr | m_pDynGeom |
vtTransformPtr | m_pDynGeomScale |
float | m_fVerticalExag |
vtTin3dPtr | m_pTin |
vtTiledGeomPtr | m_pTiledGeom |
osg::ref_ptr < vtExternalHeightField3d > | m_pExternalHeightField |
TParams | m_Params |
vtHeightField3d * | m_pHeightField |
bool | m_bPreserveInputGrid |
FMatrix4 | m_CamLocation |
bool | m_bVisited |
vtLocationSaver | m_LocSaver |
vtAnimContainer | m_AnimContainer |
vtFogPtr | m_pFog |
vtShadowPtr | m_pShadow |
vtMovGeodePtr | m_pHorizonGeom |
vtMovGeodePtr | m_pOceanGeom |
bool | m_bFog |
RGBf | m_fog_color |
RGBf | m_background_color |
bool | m_bShadows |
vtTin3dPtr | m_pWaterTin3d |
LayerSet | m_Layers |
vtStructureLayer * | m_pActiveStructLayer |
vtLodGrid * | m_pStructGrid |
vtPagedStructureLodGrid * | m_pPagedStructGrid |
int | m_iPagingStructureMax |
float | m_fPagingStructureDist |
vtMaterialArrayPtr | m_pTerrMats |
vtMaterialArrayPtr | m_pDetailMats |
vtMaterialArrayPtr | m_pEphemMats |
int | m_idx_water |
int | m_idx_horizon |
bool | m_bBothSides |
vtAbstractLayer * | m_pActiveAbstractLayer |
vtTransform * | m_pScaledFeatures |
vtFeatureLoader * | m_pFeatureLoader |
vtGroup * | m_pRoadGroup |
vtRoadMap3dPtr | m_pRoadMap |
vtPlantInstanceArray3d | m_PIA |
vtSpeciesList3d * | m_pPlantList |
vtGroup * | m_pVegGroup |
vtSimpleLodGrid * | m_pVegGrid |
vtRouteMap | m_Routes |
ImagePtr | m_pUnshadedImage |
ImagePtr | m_pSingleImage |
auto_ptr< ColorMap > | m_pTextureColors |
bool | m_bTextureInitialized |
vtTextureUnitManager | m_TextureUnits |
int | m_iShadowTextureUnit |
vtLightSource * | m_pLightSource |
FSphere | m_bound_sphere |
RGBf | m_ocean_color |
vtString | m_strParamFile |
vtEnginePtr | m_pEngineGroup |
auto_ptr< vtElevationGrid > | m_pElevGrid |
DPoint2 | m_CenterGeoLocation |
int | m_iDifferenceFromGMT |
vtString | m_strErrorMsg |
vtGroup * | m_pOverlay |
vtProjection | m_proj |
bool | m_bIsCreated |
The vtTerrain class represents a terrain, which is a part of the surface of the earth.
It is generally described by a set of parameters such as elevation, vegetation, and time of day. These terrain parameters are contained in the class TParams.
To create a new terrain, first construct a vtTerrain and set its parameters with SetParams() or SetParamFile(). You can also set many properties of the terrain directly, which is useful if you want to set them from memory instead of from disk. These include:
You can then build the terrain using the CreateStep methods, or add it to a vtTerrainScene and use vtTerrainScene::BuildTerrain.
To extend your terrain beyond what is possible with the terrain parameters, you can create a subclass of vtTerrain and implement the method CreateCustomCulture(). Here you can create anything you like, and add it to the terrain. Generally you should add your nodes with AddNode(), or AddNodeToStructGrid() if it is a structure that should be culled in the distance. You can also add your nodes with GetScaledFeatures()->addChild(), if they are 'flat' like GIS features or contour lines, which should be scaled up/down with the vertical exaggeration of the terrain.
The terrain is implemented with a scene graph with the following structure.
void vtTerrain::AddEngine | ( | vtEngine * | pE) |
Add an engine to this terrain's group of engines. The engine will be enabled only when the terrain is visible.
void vtTerrain::addNode | ( | osg::Node * | pNode) |
Add a model (or any node) to the terrain.
Adds a node to the terrain. The node will be added directly to this specific terrain, so it will be hidden whenever the terrain is not active.
bool vtTerrain::AddNodeToStructGrid | ( | osg::Node * | pNode) |
Adds a node to the terrain. The node will be added to the Structure LOD Grid of the terrain, so it will be culled when it is far from the viewer. This is usually desirable when the models are complicated or there are lot of them.
There is another form of this method which takes a vtGeode node instead.
bool vtTerrain::AddNodeToVegGrid | ( | osg::Node * | pNode) |
Adds a node to the terrain. The node will be added to the Vegetation LOD Grid of the terrain, so it will be culled when it is far from the viewer. This method is used by the terrain vegetation methods, and you can also use it directly if you have your own vegetation nodes to add.
bool vtTerrain::AddPlant | ( | const DPoint2 & | pos, |
int | iSpecies, | ||
float | fSize | ||
) |
Create a new plant instance at a given location and add it to the terrain.
pos | The 2D earth position of the new plant. |
iSpecies | Index of the species in the terrain's plant list. If you don't know the index, you can find it with vtSpeciesList::GetSpeciesIdByName or vtSpeciesList::GetSpeciesIdByCommonName. |
fSize | Height of the new plant (meters). |
float vtTerrain::AddSurfaceLineToMesh | ( | vtGeomFactory * | pMF, |
const DLine2 & | line, | ||
float | fOffset, | ||
bool | bInterp = true , |
||
bool | bCurve = false , |
||
bool | bTrue = false |
||
) |
Create geometry on the terrain for a 2D line by draping the point onto the terrain surface.
pMF | A vtGeomFactory which will produces the mesh geometry. |
line | The 2D line to drape, in Earth coordinates. |
fOffset | An offset to elevate each point in the resulting geometry, useful for keeping it visibly above the ground. |
bInterp | True to interpolate between the vertices of the input line. This is generally desirable when the ground is much more finely spaced than the input line. |
bCurve | True to interpret the vertices of the input line as control points of a curve. The created geometry will consist of a draped line which passes through the control points. |
bTrue | True to use the true elevation of the terrain, ignoring whatever scale factor is being used to exaggerate elevation for display. |
|
protected |
Create a horizontal plane at sea level.
If the terrain has a large body of water on 1 or more sides, this method is useful for extending the water to the horizon by creating additional ocean plane geometry.
fAltitude | The height (Y-value) of the horizontal plane. |
bWater | True for a watery material, false for a land material |
bHorizon | If true, create tiles extending from the terrain extents to the horizon. |
bCenter | If true, create a tile in the center (covering the terrain extents). |
|
virtual |
The base CreateCustomCulture does nothing; this virtual method is meant to be overridden by your terrain subclass to add its own culture.
Reimplemented in IslandTerrain, and NevadaTerrain.
bool vtTerrain::CreateStep1 | ( | ) |
First step in terrain creation: load elevation. You can use these methods to build a terrain step by step, or simply use the method vtTerrainScene::BuildTerrain, which calls them all.
bool vtTerrain::CreateStep2 | ( | vtTransform * | pSunLight, |
vtLightSource * | pLightSource | ||
) |
Next step in terrain creation: create textures.
bool vtTerrain::CreateStep3 | ( | ) |
Next step in terrain creation: create 3D geometry for the terrain.
bool vtTerrain::CreateStep4 | ( | ) |
Next step in terrain creation: additional CLOD construction.
bool vtTerrain::CreateStep5 | ( | ) |
Next step in terrain creation: create the culture and labels.
int vtTerrain::DeleteSelectedPlants | ( | ) |
Delete all the selected plants in the terrain's plant array.
int vtTerrain::DeleteSelectedStructures | ( | ) |
Delete all the selected structures in the terrain's active structure array.
vtAbstractLayer * vtTerrain::GetAbstractLayer | ( | ) |
Get the currently active abstract layer for this terrain.
FPoint3 vtTerrain::GetCenter | ( | ) |
Return the center of the bounding sphere that encloses the terrain's dynamic geometry.
bool vtTerrain::GetGeoExtentsFromMetadata | ( | ) |
For this terrain, look at its elevation source, and determine the extents of that data, in geographic coords. This is done without actually doing a full load of the data, to quickly describe the terrain's location on the earth.
vtHeightField3d * vtTerrain::GetHeightField | ( | ) |
Return the heightfield for this terrain. It may be a grid, or a TIN. If you know that your data is a grid, you can use GetHeightFieldGrid3d() to get that specifically.
vtHeightFieldGrid3d * vtTerrain::GetHeightFieldGrid3d | ( | ) |
Return the heightfield grid for this terrain. During the construction of the terain, this may be a source vtElevationGrid. Later, at runtime, it is likely to be one of the dynamic geometry (CLOD) grids.
vtTime vtTerrain::GetInitialTime | ( | ) |
Get the time at which a terrain is set to begin.
TParams & vtTerrain::GetParams | ( | ) |
Returns a direct reference to the parameters object for this terrain, so that you can get and set the parameters.
float vtTerrain::GetRadius | ( | ) |
Return the radius of the bounding sphere that encloses the terrain's dynamic geometry.
|
inline |
You should add your nodes to this terrain's scaled features if they are 'flat' like GIS features or contour lines, which should be scaled up/down with the vertical exaggeration of the terrain.
vtStructureLayer * vtTerrain::GetStructureLayer | ( | ) |
Get the currently active structure layer for this terrain.
osg::Image * vtTerrain::GetTextureImage | ( | ) |
Get the texture image of the ground texture, if there is one. If the texture is more complicated (e.g. tileset) then NULL is returned.
vtLayer * vtTerrain::LoadLayer | ( | const char * | fname) |
Currently handled by this method: structure and abstract layers.
vtTransform * vtTerrain::LoadModel | ( | const char * | filename, |
bool | bAllowCache = true |
||
) |
Load an external geometry file.
Loads an external 3D model as a movable node. The file will be looked for on the Terrain's data path, and wrapped with a vtTransform so that it can be moved.
To add the model to the Terrain's scene graph, use AddModel or AddModelToLodGrid. To plant the model on the terrain, use PlantModel or PlantModelAtPoint.
You should also make sure that your model is displayed at the correct scale. If the units are of the model are not meters, you should scale the correct factor so that it matches the units of the Terrain:
vtStructureLayer * vtTerrain::LoadStructuresFromXML | ( | const vtString & | strFilename) |
Attempt to load structures from a VTST file. If successful, the structures will be added to the Terrain's set of structure arrays.
vtStructureLayer * vtTerrain::NewStructureLayer | ( | ) |
Create a new structure array for this terrain, and return it.
|
virtual |
Override this method to customize the Dib, before it is turned into a vtImage. The default implementation colors from elevation.
Reimplemented in IslandTerrain.
void vtTerrain::PlantModel | ( | vtTransform * | model) |
Place a model on the terrain.
"Plants" a model on the ground. This is done by moving the model directly up or down such that its local origin is at the height of the terrain.
Note: this function does not add the model to the terrain's scene graph. Use AddNode for that operation.
void vtTerrain::PlantModelAtPoint | ( | vtTransform * | model, |
const DPoint2 & | pos | ||
) |
Place a model on the terrain at a specific point.
"Plants" a model on the ground. This is done by moving the node to the indicated earth coordinate, then moving it directly up or down such that its local origin is at the height of the terrain.
model | The model to be placed on the terrain. |
pos | The position (in earth coordinates) at which to place it. This position is assumed to be in the same coordinate system that the Terrain is using. |
Note: this function does not add the model to the terrain's scene graph. Use AddNode for that operation.
bool vtTerrain::PointIsInTerrain | ( | const DPoint2 & | p) |
Test whether a given point is within the current terrain.
Tests whether a given point (in Earth coordinates) is within the current extents of the terrain.
void vtTerrain::RecreateTextures | ( | vtTransform * | pSunLight, |
bool | progress_callbackint = NULL |
||
) |
Re-create the ground texture. This is useful if you ahve changed the time of day, and want to see the lighting/shading of the terrain updated.
void vtTerrain::RedrapeCulture | ( | const DRECT & | area) |
Drape all the culture on the terrain again, to keep them on the surface in the case when the elevation values have changed.
area | You can speed up this function by passing the area to re-drape in. Otherwise, simply pass an empty area, and all culture will be re-draped. |
void vtTerrain::removeNode | ( | osg::Node * | pNode) |
Remove a node from the terrain's scene graph.
Removes a node from the terrain.
void vtTerrain::RemoveNodeFromStructGrid | ( | osg::Node * | pNode) |
Removes a node from the terrain's structure LOD grid.
void vtTerrain::SetAbstractLayer | ( | vtAbstractLayer * | alay) |
Set the currently active abstract layer for this terrain.
void vtTerrain::SetLocalGrid | ( | vtElevationGrid * | pGrid, |
bool | bPreserve | ||
) |
This method allows you to give the terrain a grid to use directly instead of loading the BT file specified in the TParams.
You must allocate this grid dynamically with 'new', since vtTerrain will 'delete' it after using it during initialization. If you don't want the memory to be deleted, pass 'true' for bPreserve.
pGrid | The grid object which the terrain should use. |
bPreserve | True if the terrain should not delete the grid object, otherwise false. |
void vtTerrain::SetParamFile | ( | const char * | fname) |
Tells the terrain what file contains the parameters to use.
fname | The name of a terrain parameters file, e.g. "Simple.xml". |
void vtTerrain::SetParams | ( | const TParams & | Params) |
Set all of the parameters for this terrain.
Params | An object which contains all the parameters for the terrain. |
void vtTerrain::SetPlantList | ( | vtSpeciesList3d * | pPlantList) |
Set the list of plant species that this terrain should use. Using this method allows a set of species to be shared between many terrains.
void vtTerrain::SetTextureColors | ( | ColorMap * | colors) |
Set the colors to be used in a derived texture.
Set the array of colors to be used when automatically generating the terrain texture from the elevation values. This is the color map which is used for automatic generation of texture from elevation, when the terrain is built normally with the "Derived" texture option. The colors brackets go from the lowest elevation value to the highest.
colors | A pointer to a colormap. The terrain takes ownership of the ColorMap object so it will be deleted when the terrain is deleted. |
void vtTerrain::SetTextureContours | ( | float | fInterval, |
float | fSize | ||
) |
Sets the texture colors to be a set of black contour stripes.
This method sets the terrain's color map to a series of white and black bands which indicate elevation contour lines. This is the color map which is used for automatic generation of texture from elevation, when the terrain is built normally with the "Derived" texture option.
You can use this function either before the terrain is built, or afterwards if you intend to re-build the textures.
fInterval | The vertical spacing between the contours. For example, if the elevation range of your data is from 50 to 350 meters, then an fIterval of 100 will place contour bands at 100,200,300 meters. |
fSize | The vertical thickness of each contour band, generally a few meters. A band of this thickness will be centered on each contour line of the desired elevation. |
void vtTerrain::SetTin | ( | vtTin3d * | pTin) |
This method allows you to give the terrain a TIN to use directly instead of loading a .tin file as specified in the TParams.
void vtTerrain::TranslateFromGMT | ( | vtTime & | time) |
Given a time value, convert it to the LT (local time) of the center of this terrain from GMT. Local time is defined precisely by longitude, e.g. at noon local time, the sun is exactly halfway across the sky.
Note that this is different that the "standard time" of a given place, which involves finding out what time zone is in effect (complicated!)
void vtTerrain::TranslateToGMT | ( | vtTime & | time) |
Given a time value, convert it from the LT (local time) of the center of this terrain to GMT. Local time is defined precisely by longitude, e.g. at noon local time, the sun is exactly halfway across the sky.
Note that this is different that the "standard time" of a given place, which involves finding out what time zone is in effect (complicated!)
void vtTerrain::UpdateElevation | ( | ) |
If you have told vtTerrain to preserve a copy of the original elevation grid in memory, you can modify that grid, then call this method to update the CLOD surface. This can take up a few seconds, depending on the size of your grid.