SetPosition

The SetPosition() method sets the position and orientation of the object on the terrain. If the client handles the _ITerraExplorerEvents4::OnFrame() event, it can set the object position in every frame (according to a GPS input, for example) to create a flowing motion of the object, on the terrain.

 

HRESULT SetPosition(

[in] double X,

[in] double Y,

[in] double Elevation,

[in] double Yaw,

[in] double Pitch,

[in] double Roll,

[in, 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_TEOBJECT_NOLONGEREXIST

The object you are trying to access no longer exists. This may have occurred because, while keeping an interface to the object, the user deleted it from TerraExplorer (via the TE user interface). Without the object, the interface cannot be used. Therefore, you should release the interface.

TE_E_INTERNAL

TerraExplorer was unable to create the object. To get more information about this error use the IErrorInfo Interface.