CreatePosition

Creates a position in the 3D Window with specific coordinate information (X, Y, Altitude), orientation properties (Yaw, Pitch, Roll) and distance from which to observe the point of interest.

 

JavaScript

 

CreatePosition(

       X,

       Y,

       Altitude,

       AltitudeType,

       Yaw,

       Pitch,

       Roll,

       Distance)

 

C#

 

IPosition80 CreatePosition(

       double X = 0,

       double Y = 0,

       double Altitude = 0,

       AltitudeTypeCode AltitudeType = AltitudeTypeCode.ATC_TERRAIN_RELATIVE,

       double Yaw = 0,

       double Pitch = 0,

       double Roll = 0,

       double Distance = 0)

 

C++

 

HRESULT CreatePosition(

       double X,

       double Y,

       double Altitude,

       AltitudeTypeCode AltitudeType,

       double Yaw,

       double Pitch,

       double Roll,

       double Distance,

       IPosition80** pVal)

 

Parameters

X

The West-East coordinate of the location of interest represented in the project’s coordinate system units. You can use the ITerrain80 interface to retrieve information about the project’s coordinate system units.

Y

The North-South coordinate of the location of interest represented in coordinate system units. You can use the ITerrain80 interface to retrieve information about the project’s coordinate system units.

Altitude

The elevation of the location of interest relative to the terrain.

AltitudeType

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

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

·          ATC_PIVOT_RELATIVE = 1
Places each point of the object at a specified altitude above the pivot point altitude, defined by its Point Altitude. The pivot is located at the center of the object.

·          ATC_ON_TERRAIN = 2
Creates the object on the terrain itself.

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

·          ATC_3DML_RELATIVE  = 4
Places the object’s pivot point at a specified altitude above the 3DML layer.

Note:    ATC_PIVOT_RELATIVE and ATC_ON_TERRAIN values apply only for 2D shapes and polygons. ATC_3DML_RELATIVE only applies to image and text labels.

Yaw

The Yaw angle between the viewer and the point of interest. Range from 0 to 360 where 0=North, 90=East, 180=South and 270=West.

Pitch

The Pitch angle between the viewer and the point of interest. Range from -90 to +90 where 0 = Horizon, +90 = straight up and –90 = straight down.

Roll

The Roll angle between the viewer and the point of interest. Range from -90 to +90 where 0 = Horizon, +90 = Full roll right and –90 = Full roll left.

Distance

The distance from which the x, y and height coordinates must be viewed.

Return Value

pVal

An IPosition80representing the created position.

Exceptions

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