modifyMesh
The modifyMesh object enables creation of modify mesh objects. Modify mesh objects modify the elevation values in an area of the mesh based on a polygon. The surface of the mesh is raised or lowered according to the elevation values of the polygon's points and the options set. The following member and method are available:
§ items
§ create()
static items : Array<TerraExplorerObject>
Returns an array of TerraExplorerObject containing all modify mesh objects in the project.
create(description, polygon, altitude, options) → {promise}
Creates a modify mesh object.
Parameters
Name |
Type |
Description |
||||||
description |
String |
The name of the modify mesh object as it appears in the Layers and Objects section of the Analysis tab on the sidebar. |
||||||
polygon |
Array of |
Array which represents the modify mesh polygon. |
||||||
altitude |
Number |
The altitude by which to raise or lower the surface of the terrain in the area of the modify mesh polygon. |
||||||
meshObject |
The TerraExplorerObject representing the mesh object that the modification should apply to. |
|||||||
options |
Object |
|
Returns
Promise - A promise that resolves to the newly created modify mesh TerraExplorerObject object.
Example
The following example creates a modifyMesh object:
var pos1 = Cesium.Cartesian3.fromDegrees(-81.38165, 28.54462);
var pos2 = Cesium.Cartesian3.fromDegrees(-81.37607, 28.54469);
var pos3 = Cesium.Cartesian3.fromDegrees(-81.37596, 28.54060);
var pos4 = Cesium.Cartesian3.fromDegrees(-81.38165, 28.54060);
var cart = [pos1, pos2, pos3, pos4];
Cesium.when(TerraExplorer.layers.mesh.create("Orlando ©Dat'Air", "https://www.skylineglobe.com/sg/streamer.ashx", "sg3dml_orlando", true),function(_3DMLObj){
Cesium.when(TerraExplorer.objects.modifyMesh.create("modifyMesh", cart, 150, _3DMLObj, {}),function(ModifyTerrainObject){
ModifyTerrainObject.flyTo();
});});