ITerrainModel80

Objects that implement this interface use an external file to define the model rendered on the terrain. TerraExplorer supports the following formats:

§   COLLADA (DAE), e.g. DAE models created in PhotoMesh or Sketchup

§   OBJ – Wavefront simple data-format for storing 3D model surface geometry, color and texture information.

§   Direct X (X) and its compressed version (XPC)

§   3DS – 3D studio format for exchanging 3D data models

§   OpenFlight (FLT) – Multigen format for exchanging 3D data models and its compressed version (FPC)

§   XPL and XPL2, which provide better performance for the Direct X model (A set of XPL files is created from a single X file where each file contains data for one Level of Detail (LOD) only)

§   GLB – Binary file format representation of 3D mesh models saved in the GL Transmission Format (glTF).

 

 

Properties

 

Action

An IAction80 representing the operation that takes place when the object is clicked in the Project Tree.

Attachment

An IAttachment80 representing the attachment behavior of the model.

BestLOD

Gets and sets the best LOD file based on the viewer position in relation to the object.

FlipTexture

Gets and sets a Boolean that determines whether the model’s textures are automatically flipped.

ID

Gets the ID of the object. (Inherited from ITerraExplorerObject80)

Message

An IMessageObject80 representing the message object assigned to the model.

ModelFileName

Gets and sets a full path name or a URL to the model that this object should use.

ModelType

Gets the model type. 

ObjectType

Gets an enum that identifies the type of the object. (Inherited from ITerraExplorerObject80)

Position

An IPosition80 representing the position and orientation of the model on the terrain.

SaveInFlyFile

Gets and sets a Boolean that determines whether the model is saved in the Fly file. (Inherited from ITerraExplorerObject80)

ScaleFactor

Gets and sets the scale factor for the model.

ScaleX

Gets and sets the value by which to scale the model on its x axis.

ScaleY

Gets and sets the value by which to scale the model on its y axis.

ScaleZ

Gets and sets the height (Z value) of the 3D model.

Terrain

An ITerrainObject80 representing terrain properties including draw order and ground object status.

Timespan

An ITimeSpan80 representing the timespan in which the model is visible on the terrain.

Tooltip

An ITooltip80 representing the tooltip that displays when a mouse cursor is placed over the model in the 3D Window.

TreeItem

An ITreeItem80 describing the representation of the model in the Project Tree.

Visibility

An IVisibility80 representing the visibility of the model at different distances.

 

Methods

 

GetClientData

Gets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject80)

GetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject80)

SetClientData

Sets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject80)

SetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject80)

BestLOD

TerraExplorer displays the best LOD file based on the viewer position in relation to the object. In addition, when downloaded from a web server, each file is downloaded independently. As a result, the model overall display performance and download rate are improved. Only the first LOD file of a set can be opened, and the other files are read automatically

 

JavaScript

 

 

 

BestLOD

 

C#

 

 

 

double BestLOD { get; set; }

 

C++

 

 

 

HRESULT BestLOD([out, retval] double* pVal)

HRESULT BestLOD([in] double pVal)

FlipTexture

Gets and sets a Boolean that determines whether the model’s textures are automatically flipped.

 

JavaScript

 

 

 

FlipTexture

 

C#

 

 

 

bool FlipTexture { get; set; }

 

C++

 

 

 

HRESULT FlipTexture([out, retval] VARIANT_BOOL* pVal)

HRESULT FlipTexture([in] VARIANT_BOOL pVal)

ModelFileName

Gets and sets a full path name or a URL to the model that this object should use.

 

JavaScript

 

 

 

ModelFileName

 

C#

 

 

 

string ModelFileName { get; set; }

 

C++

 

 

 

HRESULT ModelFileName([out, retval] BSTR* pVal)

HRESULT ModelFileName([in] BSTR pVal)

ModelType

Gets an enum that indicates the model type. The following are the possible values for this code:

§   MT_NORMAL = 0
Regular model.

§   MT_ANIMATION = 1
Direct X animation model.

§   MT_PROGRESSIVE = 2
Reserved.

 

JavaScript

 

 

 

ModelType

 

C#

 

 

 

ModelTypeCode ModelType { get; }

 

C++

 

 

 

HRESULT ModelType([out, retval] ModelTypeCode* pVal)

ScaleFactor

Gets and sets the scale factor for the model. This property scales the model in all three axes, maintaining the model’s original aspect ratio.

Note:    If you want to scale the model in each axis independently of the other axes, use the ScaleX, ScaleY, and ScaleZ properties.

 

JavaScript

 

 

 

ScaleFactor

 

C#

 

 

 

double ScaleFactor { get; set; }

 

C++

 

 

 

HRESULT ScaleFactor([out, retval] double* pVal)

HRESULT ScaleFactor([in] double pVal)

ScaleX

Gets and sets the value by which to scale the model on its x axis. The 3D model can be scaled independently in each of the three axes. The actual X value of the model in the 3D World is the x value of the model in its internal coordinate system multiplied by the ScaleX value. (i.e., if the model has an X value of 5 units and the ScaleX is set to 10 meters per pixel, the x value of the object in the 3D World is 50 meters.)

Note:    If you want to scale the model in all three axes, maintaining the model’s aspect ratio, use the ScaleFactor property.

 

JavaScript

 

 

 

ScaleX

 

C#

 

 

 

double ScaleX { get; set; }

 

C++

 

 

 

 

HRESULT ScaleX([out, retval] double* pVal)

HRESULT ScaleX([in] double pVal)

ScaleY

Gets and sets the value by which to scale the model on its y axis. The 3D model can be scaled independently in each of the three axes. The actual Y value of the model in the 3D World is the y value of the model in its internal coordinate system multiplied by the ScaleY value. (i.e., if the model has a Y value of 10 units and the ScaleY is set to 10 meters per pixel, the Y value of the object in the 3D World is 100 meters.)

Note:    If you want to scale the model in all three axes, maintaining the model’s aspect ratio, use the ScaleFactor property.

 

JavaScript

 

 

 

ScaleY

 

C#

 

 

 

double ScaleY { get; set; }

 

C++

 

 

 

 

HRESULT ScaleY([out, retval] double* pVal)

HRESULT ScaleY([in] double pVal)

ScaleZ

Gets and sets the height (Z value) of the 3D model. The 3D model can be scaled independently in each of the three axes. The actual height of the model in the 3D World is the height of the model in its internal coordinate system multiplied b the ScaleZ value. (i.e., if the model has a height of 5 units and the ScaleZ is set to 10 meters per pixel, the height of the object in the 3D World is 50 meters.)

Note:    If you want to scale the model in all three axes, maintaining the model’s aspect ratio, use the ScaleFactor property.

 

JavaScript

 

 

 

ScaleZ

 

C#

 

 

 

double ScaleZ { get; set; }

 

C++

 

 

 

HRESULT ScaleZ([out, retval] double* pVal)

HRESULT ScaleZ([in] double pVal)