Class: Excavation

Excavation

用于地形开挖相关功能

const points = [
  new Position(120.39110067, 31.9271842, 26.21342657),
  new Position(120.39433747, 31.93084495, 113.8531542),
  new Position(120.39850462, 31.92980511, 25.5727606),
  new Position(120.39772399, 31.92629429, 37.2912552)
]
const excavation = new Excavation(this.$viewer, {
    wallImg: require('../../assets/dataImages/excavate_side_min.jpg'),
    bottomImg: require('../../assets/dataImages/excavate_bottom_min.jpg'),
    depth: 30
  })
excavation.updateData(
  points
)

new Excavation(viewer, options)

underground/Excavation.js, line 30

可选参数

Name Type Description
viewer Viewer

当前视图

options Object

其他可选参数

Name Type Default Description
positions Array.<Position>

挖掘的多边形边界坐标串

depth Number optional

下挖深度(米)

splitNum Number 50 optional

挖掘的多边形坐标之间插值数量

wallImg Property | string | HTMLCanvasElement

挖掘区域侧面贴图

bottomImg Property | string | HTMLCanvasElement

挖掘区域底面贴图

Classes

Excavation

Members

depth

下挖深度设置(米)

show

挖掘结果是否显示隐藏

Methods

clear()

underground/Excavation.js, line 151

清除挖掘结果

updateData(positions)

underground/Excavation.js, line 90

更新挖掘区域

Name Type Description
positions Array.<Position>

挖掘区域坐标