This method returns the calculated angle between two specified 3D-coordinates and allows you to perform the calculation based on a Cartesian coordinate system. When using a flat terrain database, the calculation is always based on a Cartesian system. The two points are defined with X, Y coordinates, and Elevation relative to the terrain database vertical datum base ellipsoid (absolute height). The return doubleYaw and doublePitch values define the pitch and yaw angles for viewing the second point from the first.
Implemented only in ICoordSys3.
HRESULT GetAimingAnglesEx(
[in] double X1,
[in] double Y1,
[in] double Elevation1,
[in] double X2,
[in] double Y2,
[in] double Elevation2,
[out] VARIANT* doubleYaw,
[out] VARIANT* doublePitch,
[in, optional, defaultvalue(0)] long Flags);
Parameters:
X1 – X coordinate of first point.
Y1 – Y coordinate of first point.
Elevation1 – Elevation value relative to the terrain database vertical datum base ellipsoid (absolute height), of the first point.
X2 – X coordinate of second point.
Y2 – Y coordinate of second point.
Elevation2 – Elevation value relative to the terrain database vertical datum base ellipsoid (absolute height) of the second point.
doubleYaw – Returns the yaw angle for viewing the second point from the first.
doublePitch – Returns the pitch angle for viewing the second point from the first.
Flags – Determine the coordinate system used to perform the calculation. Valid flags for this method are:
0
Use spherical coordinate system. When using a flat terrain
database, Cartesian system is applied.
1
Use Cartesian coordinate system.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
TE_E_INTERNAL |
TerraExplorer internal error. |