Home > Working with SGWorld > Creator (ICreator6) > CreateTerrainModifier
A terrain modifier object is a unique polygon in the TerraExplorer world that changes the elevation values of the terrain based on a polygon.
JavaScript |
|
CreateTerrainModifier( pIGeometry, Mode , Flat , Feather , GroupID , Description ) |
C# |
|
ITerrainModifier6 CreateTerrainModifier( IGeometry pIGeometry, ElevationBehaviorMode Mode = ElevationBehaviorMode.EB_REPLACE, bool Flat = true, double Feather = 0, int GroupID = 0, string Description = "") |
C++ |
|
HRESULT CreateTerrainModifier( IGeometry* pIGeometry, ElevationBehaviorMode Mode, VARIANT_BOOL Flat, double Feather, LONG_PTR GroupID, BSTR Description, ITerrainModifier6** pITerrainModifier6) |
Parameters
pIGeometry
An IGeometry representing geometric properties of the terrain modifier polygon.
Mode
An enum determining the elevation behavior mode.
The ElevationBehaviorMode enum can use any of the following values:
§ EB_REPLACE = 0
Replaces the area defined by the polygon with the selected
elevation value.
§ EB_BELOW = 1
Replaces all elevation values that are lower than the selected
elevation value with the selected elevation value
§ EB_ABOVE = 2
Replaces all elevation values that are higher than the selected
elevation value with the selected elevation value
Flat
A Boolean that determines if the modified terrain creates a flat surface.
Feather
The size of the feather radius in meters.
GroupID
The Project Tree group in which the terrain modifier is created. If it is set to zero, the object is created under the root. You can obtain the GroupID by one of the following methods:
§ Create the group using IProjectTree6.CreateGroup.
§ Find the group, if you know the name, using IProjectTree6.FindItem.
§ Traverse the Tree using IProjectTree6 methods such as GetNextItem(), until you come to the desired GroupID.
Description
The name of the terrain modifier as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pITerrainModifier6
An ITerrainModifier6 representing the terrain modifier polygon.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.