1. PlaneClipTool
自由剖切工具
1.1. new PlaneClipTool(geomap, [options])
Param | Type | Default | Description |
---|---|---|---|
geomap | GeoMap | GeoMap对象 |
|
[options] | Object | 剖切默认配置项 |
|
options.tileset | Cesium3DTileset | 将要裁切的3DTiles对象(目前仅支持一个, 后续可扩展为多个) |
|
[options.clipMode] | ClipModeType | ClipModeType.X |
剖切模式 |
[options.isVisible] | Boolean | true |
剖切面是否显示 |
[options.radius] | Number | 编辑轴半径, 默认为要剖切的模型半径 |
|
[options.minimumScale] | Number | 0.2 |
编辑轴最小尺寸,大于等于0.1,(尺寸倍数相对于radius值而言) |
[options.maximumScale] | Number | 5 |
编辑轴最大尺寸,不能小于minimumScale,小于则取minimumScale,(尺寸倍数相对于radius值而言) |
[options.planeScale] | Number | 0.5 |
剖切平面边长尺寸,(尺寸倍数相对于radius值而言) |
Example
const modelLayer = layerManager.createLayer(BOSGeo.LayerType.MODEL, "模型");
const layer = modelLayer.add({
url: 'https://lab.earthsdk.com/model/887b3db0cd4f11eab7a4adf1d6568ff7/tileset.json',
name: 'model1',
featureType: BOSGeo.FeatureType.TILES,
position: [113.107767, 23.02872, 40]
});
const planeClipTool = new BOSGeo.PlaneClipTool(map, {
tileset: layer
});
1.2. 属性
属性名 | Type | Default | Description |
---|---|---|---|
isVisible | Boolean | true | 剖切面是否显示 |
clipMode | String | BOSGeo.ClipModeType.X |
剖切模式 |
minimumScale | Number | 0.2 | 编辑轴最小尺寸,大于等于0.1,(尺寸倍数相对于radius值而言) |
maximumScale | Number | 5 | 编辑轴最大尺寸,不能小于minimumScale,小于则取minimumScale,(尺寸倍数相对于radius值而言) |
planeScale | Number | 5 | 剖切平面边长尺寸,(尺寸倍数相对于radius值而言) |
1.3. 方法
1.3.1. planeClipTool.setClippingModel(model)
设置将要剖切的模型对象
Param | Type | Description |
---|---|---|
model | Cesium3DTileset |
3DTiles对象 |
Example
var measureTool = new BOSGeo.MeasureTools(geomap);
measureTool.drawDistance(attr, okHandler);
1.3.2. planeClipTool.destroy() ⇒ Boolean
销毁面剖切工具