new ViewShed3D(scene)
可视域分析,设置观察点、目标的位置,水平、垂直视角范围,建立可视区域分析并在指定的场景中显示分析结果。
| Name | Type | Description |
|---|---|---|
scene |
Object |
场景对象。 |
- Demo:
Throws:
-
scene are required。
- Type
- DeveloperError
Example
//创建可视域分析
var viewShed3D= new SuperMap3D.ViewShed3D(scene);
Members
-
localToCameraViewsArray
-
Get or Set the viewPosition
Methods
-
addClipRegion(){boolean}
-
添加裁剪区域。
Name Type Description options.namestring 裁剪区域的名称。
options.positionArray.<number> 裁剪区域。
Returns:
Type Description boolean result 裁剪区域是否添加成功。 Example
let positions = [102, 24, 10, 103, 24, 10]; viewshed3D.addClipRegion({name: 'test', position: positions}); -
build()
-
创建可视域分析。
-
clear()
-
清除可视域分析结果。
-
destroy()
-
销毁对象
-
getViewshedParameter(){Object}
-
获取可视域闭合体的构建参数。
Returns:
Name Type Description resultObject 返回可视/不可视闭合体的构建参数,包括视点、障碍点行列阵列及半径。 Name Type Description result.viewPositionPoint3D distancenumber 可视域距离 -
getVisibleInViewport(index){boolean}
-
获得可视域分析在对应视口的可见性。
Name Type Description indexnumber 指定的视口索引。
Throws:
-
索引值的范围为:0-8。
- Type
- DeveloperError
Returns:
Type Description boolean 可见性。 -
-
isDestroyed(){boolean}
-
对象是否被销毁
Returns:
Type Description boolean result -
removeAllClipRegion()
-
移除所有裁剪区域
-
removeClipRegion(name){boolean}
-
移除裁剪区域。
Name Type Description namestring 区域名称。
Returns:
Type Description boolean result 是否删除成功。 -
setClipMode()
-
设置裁剪模式
Example
viewshed3D.setClipMode(SuperMap3D.ClippingType.KeepOutside); -
setDistDirByPoint(position)
-
通过点(经度,纬度,高度)设置方向。
Name Type Description positionArray 位置。
Throws:
-
位置是[经度,纬度,高度] 并且不等于viewPosition。
- Type
- DeveloperError
-
-
setVisibleInViewport(index)
-
设置可视域分析在对应视口的可见性。
Name Type Description indexnumber 指定的视口索引。
Throws:
-
索引值的范围为:0-8。
- Type
- DeveloperError
-