Create3DPolygon

The Create3DPolygon method creates an ITerrain3DPolygon61 object.

 

JavaScript

 

Create3DPolygon(pIGeometry, ObjectHeight, LineColor, FillColor, AltitudeType, GroupID, Description)

 

C#

 

ITerrain3DPolygon61 Create3DPolygon(    

  IGeometry   pIGeometry,

  double ObjectHeight = 20,

  object LineColor = -16711936,

  object FillColor = -10197916,

  AltitudeTypeCode AltitudeType = AltitudeTypeCode.ATC_TERRAIN_RELATIVE,

  int GroupID = 0,

  string Description = "")

 

C++

 

HRESULT Create3DPolygon(

        IGeometry *  pIGeometry,

        double       ObjectHeight,

        VARIANT      LineColor,

        VARIANT      FillColor,

        AltitudeTypeCode    AltitudeType,

        LONG_PTR     GroupID,

        BSTR  Description,

        ITerrain3DPolygon61 **    pITerrain3DPolygon61) 

 

Parameters

pIGeometry

An IGeometry representing the geometric properties and behavior of the object.

ObjectHeight

The height of the 3-dimensional polygon in meters.

LineColor

The color of the lines that make up the 3-dimensional polygon. The color value is used to specify color and transparency values. This parameter can be any of the following:

·         An IColor61 object.

·         A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·         A string that represents HTML color format (“#RRGGBB”).

FillColor

The color which fills the 3-dimensional polygon, if the alpha value is greater than zero. The color value is used to specify color and transparency values. This parameter can be any of the following:

·         An IColor61 object.

·         A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·         A string that represents HTML color format (“#RRGGBB”).

AltitudeType

An enum that determines the altitude type to be used by the object. The following are the possible AltitudeType values:

·         ATC_TERRAIN_RELATIVE = 0
Places the object’s pivot point at a specified altitude above the ground.

·         ATC_TERRAIN_ABSOLUTE = 3

Places the object’s pivot point at a specified altitude above the terrain database vertical datum base ellipsoid.

GroupID

The Project Tree group in which the 3-dimensional polygon 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 IProjectTree61.CreateGroup.

§  Find the group, if you know the name, using IProjectTree61.FindItem.

§  Traverse the Tree using IProjectTree61 methods such as GetNextItem (), until you come to the desired GroupID.

Description

The name of the 3-dimensional polygon as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrain3DPolygon61

An ITerrain3DPolygon61 object, representing the created object.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.