请超图的老师们看一下代码思路是否正确,进行插件客户端模拟挖坑
var pt = new SuperMap.Pixel(e.get_clientX(), e.get_clientY());
this._point = this._sceneControl.pixelToGlobe(pt, SuperMap.Web.Realspace.PixelToGlobeMode.TerrainAndModel);
this._points.add(new SuperMap.Web.Core.Point3D(this._point.x, this._point.y, (this._point.z + 0.05)));
var layer3Ds_count = scene.get_layer3Ds().get_count();
var layer3D = scene.get_layer3Ds().get_item(1);
layer3D.set_isExcavation(true);
//设置地下深度等信息
underground = scene.get_underground();
underground.set_isVisible(true);
underground.set_depth(500);
//设置地表透明度信息,值域范围在0-1
globalImage = scene.get_globalImage();
globalImage.set_transparency(0);
var region3D = new SuperMap.Web.Core.GeoRegion3D();
region3D.addPart(this._points);
array = "";
globalImage.clearExcavationRegions();
excavationRegionValue = 0;
var style3d = new SuperMap.Web.Core.Style3D();
style3d.set_altitudeMode(1);
//style3d.set_bottomAltitude(100);
style3d.set_extendHeight(-3);
//style3d.set_lineColor(new SuperMap.Web.Core.Color(85,107,47, 0));
var topurl = getSuperMapServerUrl() + "/iserver/excavationregion_top.jpg";
var sideurl = getSuperMapServerUrl() + "/iserver/excavationregion_side.jpg";
style3d.set_sideTextureFiles([sideurl]);
style3d.set_topTextureFile(topurl);
style3d.set_tilingU(5);
style3d.set_tilingV(1);
style3d.set_altitudeMode(3);
//var trackingLayer = scene.get_trackingLayer3D();
//trackingLayer.set_isVisible(true);
region3D._innerGeometry.style3D = style3d._innerStyle3D;
//region3D._innerStyle3D = style3d._innerStyle3D;
globalImage.addExcavationRegion(region3D, excavationRegionValue++);