Class: TerrainClip

Glodon.CIMCube.Utils. TerrainClip

开挖分析

new TerrainClip(map [, options])

开挖分析构造函数
Parameters:
Name Type Argument Description
map Glodon.CIMCube CIMCube实例
options Object <optional>
开挖分析配置参数
Properties
Name Type Argument Default Description
regions Array.<{lon:number, lat:number, height:number}> | Object <optional>
裁剪区域(仅支持GeoJson格式中的Polygon类型)
depth Number <optional>
20.0 深度,0-10000米
bottomTextureUrl String | undefined <optional>
底面纹理资源路径,当为undefined时则使用默认纯白色纹理
facadeTextureUrl String | undefined <optional>
立面纹理资源路径,当为undefined时则使用默认纯白色纹理
showTexture Boolean <optional>
true 是否显示补面的纹理, 默认为true
clippingVertexThreshold Number <optional>
100 针对每个裁剪区域,裁剪顶点阈值:区域顶点数 ≤ 该值时使用精确模式(适合大比例尺,小范围裁剪,裁剪边界精度高),否则使用性能模式(适合小比例尺,大范围裁剪,裁剪边界精度低,会有锯齿,但性能更好)

Members


bottomTextureUrl :String

底面纹理路径
Type:
  • String

clippingVertexThreshold :Number

针对每个裁剪区域,裁剪顶点阈值:区域顶点数 ≤ 该值时使用精确模式(适合大比例尺,小范围裁剪,裁剪边界精度高),否则使用性能模式(适合小比例尺,大范围裁剪,裁剪边界精度低,会有锯齿,但性能更好) 修改后仅对后续 `addRegion` 生效,已添加区域不会重建裁剪。
Type:
  • Number

depth :Number

开挖深度
Type:
  • Number

facadeTextureUrl :String

立面纹理路径
Type:
  • String

<readonly> regions :Array.<Object>

裁剪区域
Type:
  • Array.<Object>

showTexture :Boolean

是否显示补面的纹理
Type:
  • Boolean

Methods


addRegion(options)

添加裁剪范围
Parameters:
Name Type Description
options Object region对象
Properties
Name Type Description
id String ID
region Array.<{lon:number, lat:number, height:number}> | Object 坐标点数据(仅支持GeoJson格式中的Polygon类型)

clear()

清除结果

dispose()

释放资源

doAnalysis()

开始分析功能(depth、bottomTextureUrl、facadeTextureUrl发生变化时调用)

getResult()

获取分析结果

removeRegion(id)

移除裁剪范围
Parameters:
Name Type Description
id String ID