Class: RopeLines

Glodon.CIMCube.Animation.LineEffect. RopeLines

圆柱线特效

new RopeLines(viewer, opt)

圆柱线特效
Parameters:
Name Type Description
viewer Glodon.CIMCube CIMCube实例
opt Object 圆柱线特效参数
Properties
Name Type Argument Default Description
pathList Array 圆柱线特效数据;[[{lon,lat,height},{lon,lat,height}],[Cartesian3,Cartesian3]...]
color Color 圆柱线特效的颜色,默认new Color(0.1, 0.1, 0.1, 1)
radius Number <optional>
0.02 圆柱线特效的半径
slices Number <optional>
16 圆柱线特效的精细程度
shadowMode ShadowMode 阴影模式
show Boolean <optional>
true 是否显示
texture String 漫反射贴图 URL;为空时,采用无光照平面着色
textureRepeat Object 有贴图时:x/u 为周向 U 平铺倍数,y/v 为轴向 V 平铺倍数
roughness Number <optional>
0.82 粗糙度 0~1,默认约 0.82;有纹理场合生效
metallic Number <optional>
0 金属度 0~1;有纹理场合生效

Members


readyPromise :*

就绪 Promise。
Type:
  • *

show :Boolean

显示|隐藏
Type:
  • Boolean

Methods


allAdd()

全部添加。

allRemove()

全部移除。

changeCartesian3(p)

转换为世界坐标。
Parameters:
Name Type Description
p Object 坐标。
Returns:
Type
Object

createAndUpdateRopeModel(viewer, ropeModel)

创建并更新圆柱模型。
Parameters:
Name Type Description
viewer Glodon.CIMCube 视图。
ropeModel Object 圆柱模型。
Returns:
Type
Object

dispose()

释放资源

setPromiseAll()

设置全部就绪承诺。

updateMyOption(opt)

更新参数。
Parameters:
Name Type Description
opt Object 参数。
Properties
Name Type Argument Default Description
color Color 颜色。
slices Number 分段数。
radius Number 半径。
show Boolean <optional>
是否显示。
shadowMode ShadowMode 阴影模式。
texture String 纹理。
textureRepeat Object 纹理重复。
roughness Number <optional>
0.82 粗糙度。
metallic Number 金属度。

updateOption(opt, opt)

更新属性
Parameters:
Name Type Description
opt Object 更新参数
opt Object 圆柱线特效参数
Properties
Name Type Argument Default Description
color Color 线的颜色,默认new Color(0.1, 0.1, 0.1, 1)
shadowMode ShadowMode <optional>
ShadowMode.DISABLED 阴影模式
texture String 漫反射贴图 URL;不支持切换「纯色 <=> 贴图」
textureRepeat Object 有贴图时:x/u=周向 U,y/v=轴向 V 的平铺倍数
roughness Number <optional>
0.82 粗糙度 0~1,默认约 0.82;有纹理场合生效
metallic Number <optional>
0 金属度 0~1;有纹理场合生效

updatePosition(index, positions, X)

更新位置
Parameters:
Name Type Description
index Number 数据索引
positions Array 位置,[{lon,lat,height},{lon,lat,height}]
X Matrix4 矩阵。