CreateCone

Creates a cone in the 3D Window.

 

JavaScript

 

CreateCone(

       Position,

       Radius,

       ObjectHeight,

       LineColor,

       FillColor,

       NumOfSegments,

       GroupID,

       Description )

 

C#

 

ITerrain3DRegBase66 CreateCone(

       IPosition66   Position,

       double        Radius,

       [double       ObjectHeight = 20],

       [object       LineColor = 0xFF00FF00],

       [object       FillColor = 0xFF646464],

       [int          NumOfSegments = -1],

       [string       GroupID = ""],

       [string       Description = ""])

 

C++

 

HRESULT CreateCone(

        IPosition66 *       Position,

        double       Radius,

        double       ObjectHeight,

        VARIANT      LineColor,

        VARIANT      FillColor,

        long         NumOfSegments,

        BSTR         GroupID,

        BSTR         Description,

        ITerrain3DRegBase66 **    pITerrain3DRegBase66 )

Parameters

Position

An IPosition66 representing the position and orientation of the object on the terrain.

Radius

The radius of the cone in meters.

ObjectHeight

The height of the cone in meters.

LineColor

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

·          An IColor66 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 cone, 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 IColor66 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”).

NumOfSegments

The number of segments the cone has. The more segments, the smoother and more circular it appears.

GroupID

The Project Tree group in which the cone is created. If it is set to zero, the object is created in 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 cone as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrain3DRegBase66

An ITerrain3DRegBase66 representing the newly created cone.

Exceptions

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