Class: CatenaryCable

Glodon.CIMCube.Simulation. CatenaryCable

悬链线仿真类 仅用于渲染展示,基于标准悬链线解析算法

new CatenaryCable(map, options)

悬链线仿真类
Parameters:
Name Type Description
map Glodon.CIMCube CIMCube实例
options Object 线缆参数
Properties
Name Type Argument Default Description
P0 Object 起点
Properties
Name Type Argument Description
lon number <optional>
经度
lat number <optional>
纬度
height number <optional>
高度
P1 Object 终点
Properties
Name Type Argument Description
lon number <optional>
经度
lat number <optional>
纬度
height number <optional>
高度
radius number 线缆半径(粗细)
color string 颜色
texture string <optional>
漫反射贴图 URL;有默认纹理
textureRepeat Object <optional>
平铺倍数,默认 {x:6,y:1}:x→周向 U,y→轴向 V
roughness number <optional>
0.82 粗糙度 0~1,越大越哑光
metallic number <optional>
0.5 金属度 0~1,越大高光分量越强
sag number | null <optional>
弧垂/垂度;默认不加垂度偏移
segments number <optional>
50 采样段数(绳索段数 = segments)
slices number <optional>
16 圆柱圆周细分,默认16
shadowMode number <optional>
ShadowMode.DISABLED 阴影模式(建议有纹理时启用投射阴影以增强立体感)
show boolean <optional>
true 是否显示

Members


showRope :boolean

显示/隐藏绳索
Type:
  • boolean

Methods


dispose()

销毁绳索

updateOption(options)

更新端点、弧垂或样式并刷新绳索
Parameters:
Name Type Description
options Object 线缆参数
Properties
Name Type Argument Description
P0 Object 起点
Properties
Name Type Argument Description
lon number <optional>
经度
lat number <optional>
纬度
height number <optional>
高度
P1 Object 终点
Properties
Name Type Argument Description
lon number <optional>
经度
lat number <optional>
纬度
height number <optional>
高度
sag number <optional>
弧垂/垂度
segments number <optional>
采样段数
color string 颜色
shadowMode number <optional>
阴影模式
radius number 线缆半径(粗细)
texture string <optional>
漫反射贴图 URL;不支持切换「纯色 <=> 贴图」
textureRepeat Object <optional>
x=周向重复,y=轴向重复
roughness number <optional>
粗糙度 0~1
metallic number <optional>
金属度 0~1