IMeshLayer81

This interface provides access to 3D layers (3D mesh or 3D Gaussian Splatting).  PhotoMesh automatically generates 3D mesh and 3D Gaussian Splatting (3DGS) models from standard photographs, outputting them in 3DML or o3DML formats. TerraExplorer provides several tools for creating and converting mesh layers in 3DML format. See "TerraExplorer User Guide" for more information.

 

 

Properties

 

BBox

An IBBox3D81 representing the bounding box that designates the section of the 3D layer to load.

ClipPolygon

An IGeometry, representing a clip polygon for importing or exporting sections of the 3D layer. In PhotoMesh versions earlier than 8.0.3, this property must be manually assigned an IPolygon to take effect.

DefaultClipPolygon

An IGeometry, representing the default clip polygon for importing the 3D layer. In PhotoMesh versions earlier than 8.0.3, this property must be manually assigned an IPolygon to take effect.

CoordinateSystem

An ICoordinateSystem81 representing the layer's coordinate system.

DisplayStyle

Gets and sets the 3D model display style. The 3D layer can include a wireframe and be textured or solid color.

FeatureLayers

An I3DMLFeatureLayers81 that returns the number of feature layers in the 3D layer and provides the index of each layer.

GroundObject

Gets and sets a Boolean that determines whether the 3DML object is a ground object.

ID

Gets the ID of the 3DML. (Inherited from ITerraExplorerObject81)

MeshGroundOffset

Gets and sets the offset from the 3D layer ground for drawing and placement of "on terrain" and "relative to ground" objects.

ObjectType

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

Oversampling

Gets and sets the 3D layer’s Level of Detail (LOD).

Path

Gets and sets the full path of the 3D layer file.

Position

An IPosition81 representing the 3D layer's position on the terrain.

ReplaceTerrainWithMesh

Gets and sets a Boolean that determines whether the 3D layer replaces the terrain imagery and elevation in the area of the 3D layer.

ReprojectElevation

Gets and sets a Boolean that determines if the layer’s elevation coordinates are reprojected from the layer’s coordinate system to the terrain’s coordinate system.

SaveInFlyFile

Gets and sets a Boolean that determines whether the 3D layer is saved in the Fly file. (Inherited from ITerraExplorerObject81)

ScaleFactor

Gets and sets the scale factor for the 3D layer.

ScaleX

Gets and sets the value by which to scale the 3D layer on its x axis.

ScaleY

Gets and sets the value by which to scale the 3D layer on its y axis.

ScaleZ

Gets and sets the value by which to scale the 3D layer on its z axis.

TreeItem

An ITreeItem81 representing details about the representation of the 3D layer in the Project Tree.

Visibility

An IVisibility81 representing the visibility of the layer at different distances.

 

Methods

 

GetClientData

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

GetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject81)

PublishToSGS

Publishes a layer to SkylineGlobe Server.

Refresh

Refreshes the layer.

SetClientData

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

SetParam

Reserved. Currently not used. (Inherited from ITerraExplorerObject81)

 

DisplayStyle

Gets and sets the 3D model's display style:

§  MLDM_NORMAL = 0 – Textured model

§  MLDM_XRAY = 2 - Semi-transparent model, enabling you to see through all model walls.

§  MLDM_SOLID = 3 – Solid color

Any of these modes can be combined with the wireframe mode:

§  MLDM_ADD_WIRE = 32768 – Add wireframe

 

JavaScript

 

DisplayStyle

 

C#

 

string DisplayStyle { get; set; }

 

C++

 

HRESULT DisplayStyle ([out, retval] MeshLayerDisplayStyle * pVal)

HRESULT DisplayStyle ([in] MeshLayerDisplayStyle pVal)

Draw Order

Gets and sets the draw order from the 3D layer's ground for drawing and placement of "on terrain" and "relative to 3DML" objects.

 

JavaScript

 

DrawOrder

                       

C#

 

string DrawOrder { get; set; }

 

C++

 

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

HRESULT DrawOrder ([in] double pVal)

 

 

GroundObject

Gets and sets a Boolean that determines whether the object is a ground object. For more information about ground objects, see the TerraExplorer User Manual.

 

JavaScript

 

 

 

GroundObject

 

C#

 

 

 

bool GroundObject { get; set; }

 

C++

 

 

 

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

HRESULT GroundObject([in] VARIANT_BOOL pVal)

MeshGroundOffset

Gets and sets the offset from the 3D layer's ground for drawing and placement of "on terrain" and "relative to 3DML" objects.

 

JavaScript

 

MeshGroundOffset

 

C#

 

string MeshGroundOffset { get; set; }

 

C++

 

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

HRESULT MeshGroundOffset ([in] double pVal)

 

Oversampling

Gets and sets the 3D layer’s Level of Detail (LOD). When set to Normal, TerraExplorer determines the optimal quality to performance balance based on the current view. This parameter can be any of the following values:

§  OVERSAMPLING_LOW = 75

§  OVERSAMPLING_NORMAL = 100

§  OVERSAMPLING_HIGH = 125

§  OVERSAMPLING_BEST = 150

 

JavaScript

 

Oversampling

 

C#

 

string Oversampling { get; set; }

 

C++

 

HRESULT Oversampling ([out, retval] OVERSAMPLING* pVal)

HRESULT Oversampling ([in] OVERSAMPLING pVal)

 

Path

Gets and sets the full path or SkylineGlobe Server URL of the 3D layer's file. The SGS URL should be in the following format: http://SGServerAddress/SG/[Site]/streamer.ashx?layer=[Name].[ID]

E.g., http://www.skylineglobe.com/SG/default/streamer.ashx?layer=Auburn_Build_8_full_PM75Patch.2463411

 

JavaScript

 

Path

 

C#

 

string Path { get; set; }

 

C++

 

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

HRESULT Path( [in] BSTR pVal)

PublishToSGS

Publishes a layer to SkylineGlobe Server. This method executes asynchronously, i.e., it returns immediately. You can then use ISGWorld.OnPublishFinished to be notified when publishing is complete.

 

JavaScript

 

PublishToSGS (

       HideProgressDialog,

       viewAccess,

       editAccess,

       Tag)

 

C#

 

void PublishToSGS (

       bool HideProgressDialog = False,

       TerraExplorerX.SGPublishPermission viewAccess = 3,

       TerraExplorerX.SGPublishPermission editAccess = 3,

       string Tag = "")

 

C++

 

HRESULT PublishToSGS(

       [in] VARIANT_BOOL HideProgressDialog,

       [in] SGPublishPermission viewAccess,

       [in] SGPublishPermission editAccess,

       [in] BSTR Tag);

 

Parameters

HideProgressDialog

A Boolean that determines whether to hide the progress dialog that shows the approximate percentage of completion.

viewAccess

An enum that determines the view access for the published layer. Users with View access can view and load the layer from the Layers page. The following are the possible values:

·        SG_PERMISSION_ONLY_ME = 0,

·        SG_PERMISSION_MY_GROUP = 1,

·        SG_PERMISSION_MY_SITE = 2,

·        SG_PERMISSION_EVERYONE = 3

editAccess

An enum that determines the edit access for the published layer. Edit access adds the ability to load, edit and save changes to the layer from TerraExplorer and the browser. The following are the possible values:

·        SG_PERMISSION_ONLY_ME = 0,

·        SG_PERMISSION_MY_GROUP = 1,

·        SG_PERMISSION_MY_SITE = 2,

·        SG_PERMISSION_EVERYONE = 3

Tag

Tags, i.e., key words or terms associated with the layer for advanced searches, represented as a semi-colon delimited string. E.g., if the layer has three tags, pass "a;b;c" for this parameter, where "a" is the value of the first tag, "b" is the value of the second, and "c" the value of the third.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

 

Refresh

Refreshes the layer.

 

JavaScript

 

Refresh

 

C#

 

void Refresh()

 

C++

 

HRESULT Refresh()

ReplaceTerrainWithMesh

This property gets and sets an enum that determines whether terrain imagery and elevation in the 3D layer's area is replaced with the 3D layer's ground layer (created in 3DML from PhotoMesh) or with the 3D layer's lower resolution data (Simplified Mesh), or not replaced at all. The following are the possible values:

§  REPLACE_TERRAIN_NONE = 0

§  REPLACE_TERRAIN_WITH_3DML_GROUND_LAYER = 1

§  REPLACE_TERRAIN_WITH_SIMPLIFIED_MESH = 2

 

JavaScript

 

ReplaceTerrainWithMesh

 

C#

 

ReplaceTerrainMeshType ReplaceTerrainWithMesh { get; set; }

 

C++

 

HRESULT ReplaceTerrainWithMesh ( [out, retval] ReplaceTerrainMeshType* pVal)

HRESULT ReplaceTerrainWithMesh ( [in] ReplaceTerrainMeshType pVal)

ReprojectElevation

Gets and sets a Boolean that determines if the layer’s elevation coordinates are reprojected from the layer’s coordinate system to the terrain’s coordinate system. This property applies only to 3D layers whose Position.AltitudeType is set to ATC_TERRAIN_ABSOLUTE = 3. Geocentric layers are always reprojected even if this property is set to false.

Note:     Changes are applied only following a call to Refresh().

 

JavaScript

 

ReprojectElevation

 

C#

 

bool ReprojectElevation { get; set; }

 

C++

 

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

HRESULT ReprojectElevation ([in] VARIANT_BOOL pVal)

 

ScaleFactor

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

 

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 mesh layer on the X axis. The 3D layer can be scaled independently in each of the three axes. The actual X value of the layer in the 3D World is the x value of the layer in its internal coordinate system multiplied by the ScaleX value. (i.e., if the mesh layer has an X value of 5 units and the ScaleX is set to 10, the x value of the object in the 3D World is 50 units.)

Note:     If you want to scale the 3D layer 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 3D layer on the Y axis. The 3D layer can be scaled independently in each of the three axes. The actual Y value of the layer in the 3D World is the y value of the layer in its internal coordinate system multiplied by the ScaleY value. (i.e., if the 3D layer has a Y value of 5 units and the ScaleY is set to 10, the y value of the object in the 3D World is 50 units.)

Note:     If you want to scale the 3D layer 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 value by which to scale the 3D layer on the Z axis. The 3D layer can be scaled independently in each of the three axes. The actual height of the layer in the 3D World is the height of the 3D layer in its internal coordinate system multiplied by the ScaleZ value. (i.e., if the 3D layer has a height of 5 units and the ScaleZ is set to 10, the height of the object in the 3D World is 50 units.)

Note:     If you want to scale the 3D layer 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)