This method retrieves the following parameters, which define the camera’s position and orientation.
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)
Parameters:
doubleX – The West-East coordinate of the camera position represented in MPT units. You can use the ITerrain interface to retrieve information about the MPT units. If you are working in a Lat-Long format, the Lat-Long values are presented in decimal degrees.
doubleY – The North-South coordinate of the camera position represented in MPT units. You can use the ITerrain interface to retrieve information about the MPT units. If you are working in a Lat-Long format, the Lat-Long values are presented in decimal degrees.
doubleHeight – The height of the camera, in meters above the ground.
doubleYaw – The Yaw angle of the plane. See: “Yaw, Pitch and Roll Angles”.
doublePitch – The Pitch angle of the plane. See: “Yaw, Pitch and Roll Angles”.
doubleRoll – The Roll angle of the plane. See: “Yaw, Pitch and Roll Angles”.
doubleCameraDeltaYaw – The offset between the plane yaw and the camera yaw. See: “Camera and Plane”.
doubleCameraDeltaPitch –
The offset between the plane pitch and the camera pitch.
See: “Camera and
Plane”.
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. |