new TerrainExcavateTool(viewer, options)
engineExtensions/tools/TerrainExcavateTool.js, line 31
| Name | Type | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewer |
Viewer | |||||||||||||||||||||||||||||||||
options |
Object |
可选参数
|
Example
const { RoamParticle } = zondy.cesium
// ES6引入方式
import { RoamParticle } from "@mapgis/webclient-cesium-plugin"
const terrainPlan = new zondy.cesium.TerrainExcavateTool(viewer, {
samplePrecision: 2
});
terrainPlan.excavateSurfaceHeight = -1000;
terrainPlan.excavateSurfaceMaxHeight = 3000;
// 笛卡尔坐标下的剖切点坐标,三个以上
terrainPlan.updateData(positions);
Members
-
defaultGroundMapString
-
默认底面颜色纹理资源路径
-
defaultWallMapString
-
默认剖面颜色纹理资源路径
-
excavateSurfaceHeightNumber
-
开挖底面的高度
- Default Value: 0
excavateSurfaceMaxHeightNumber
开挖面的最大高度
- Default Value: 0
groundDiffuseMapString
底面颜色纹理资源路径
- Default Value: 'assets/images/sandydrysoil-albedo2b.jpg'
isFillBoolean
是否进行封边
- Default Value: true
samplePrecisionNumber
采样点的精度(单位:米)
- Default Value: 0
showNumber
地形剖切显隐藏控制
- Default Value: true
wallDiffuseMapString
剖面颜色纹理资源路径
- Default Value: 'assets/images/sandydrysoil-albedo2b.jpg'
Methods
-
updateData(positions, getCoordinates)
engineExtensions/tools/TerrainExcavateTool.js, line 77 -
更新地形剖切点数据
Name Type Description positionsArray.<Cesium.Cartesian3> 裁剪点坐标数组,用于定义地形剖切的多边形边界
getCoordinatesfunction 地形剖切点数据回调函数,用于获取剖切后的地形坐标数据