GetPositionEx

This method retrieves the following parameters, which define the camera position and orientation.

Using the Flags parameter you can set the altitude method to HEIGHT_ABSOLUTE to retrieve the height above the terrain database vertical datum. This is more efficient than calling the GetPosition method and translating the height to an absolute value using ITerrain5::GetGroundHeight().

 

HRESULT GetPosition(

[out] VARIANT* doubleX,

[out] VARIANT* doubleY,

[out] VARIANT* doubleHeight,

[out] VARIANT* doubleYaw,

[out] VARIANT* doublePitch,

[out] VARIANT* doubleRoll,

[out] VARIANT* doubleCameraDeltaYaw,

[out] VARIANT* doubleCameraDeltaPitch,

[in, optional, defaultvalue(0)] long Flags)

Parameters:

Return Values:

The return value obtained from the returned HRESULT can be one of the following:

 

Return value

Meaning

S_OK

Success.

E_FAIL

Catastrophic failure.

TE_E_MPTNOTLOADED

An MPT file must be loaded in TerraExplorer for this method to work.