CreateArc

The CreateArc method creates an arc in the 3D Window.

 

JavaScript

 

CreateArc(

       Position,

       RadiusX,

       RadiusY,

       StartAngle,

       EndEngle,

       LineColor,

       FillColor,

       NumOfSegments,

       GroupID,

       Description)

 

C#

 

ITerrainArc65 CreateArc(  

       IPosition65   Position,

       double        RadiusX,

       double        RadiusY,

       [double       StartAngle = -90],

       [double       EndEngle = 90],

       [object       LineColor = 0xFF00FF00],

       [object       FillColor = 0xFF646464],

       [int          NumOfSegments = -1],

       [string       GroupID = ""],

       [string       Description = ""])

 

C++

 

HRESULT CreateArc(

        IPosition65 *       Position,

        double       RadiusX,

        double       RadiusY,

        double       StartAngle,

        double       EndEngle,

        VARIANT      LineColor,

        VARIANT      FillColor,

        long         NumOfSegments,

        BSTR         GroupID,

        BSTR         Description,

        ITerrainArc65 **    pITerrainArc65) 

 

Parameters

Position

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

RadiusX

The radius of the arc along the x-axis in meters.

RadiusY

The radius of the arc along the y-axis in meters

StartAngle

The angle at which the arc begins.

EndAngle

The angle at which the arc ends.

LineColor

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

·          An IColor65 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 arc, 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 IColor65 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 from which the arc is created. The greater the number of segments; the smoother the shape.

GroupID

The Project Tree group in which the arc was 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 IProjectTree65.CreateGroup.

·          Find the group, if you know the name, using IProjectTree65.FindItem.

·          Traverse the Tree using IProjectTree65 methods such as GetNextItem, until you come to the desired GroupID.

Description

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

Return Value

pITerrainArc65

An ITerrainArc65 representing the newly created arc.

Exceptions

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