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# |
|
ITerrainModifier66 CreateTerrainModifier( IGeometry pIGeometry, [ElevationBehaviorMode Mode = ElevationBehaviorMode.EB_REPLACE], [bool Flat = true], [double Feather = 0], [string GroupID = ""], [string Description = ""]) |
C++ |
|
HRESULT CreateTerrainModifier( IGeometry* pIGeometry, ElevationBehaviorMode Mode, VARIANT_BOOL Flat, double Feather, BSTR GroupID, BSTR Description, ITerrainModifier66** pITerrainModifier66) |
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 an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:
· Create the group using IProjectTree66.CreateGroup.
· Find the group, if you know the name, using IProjectTree66.FindItem.
· Traverse the Tree using IProjectTree66 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
pITerrainModifier66
An ITerrainModifier66 representing the terrain modifier polygon.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.