1. CustomWallPrimitive

1.1. 初始化 new CustomWallPrimitive(options)

自定义墙面图元

Param Type Default Description
options Object

配置参数

options.id String Object

图元id

[options.depthTestEnabled] Boolean true

是否开启深度测试(开启则不采用深度测试失败材质)

[options.wallHeight] Number 10

墙面相对高度,墙体相对于墙角底部高度, 值可为负但不能为零,单位为米

[options.bottomHeight] Number

墙底部高程(距离海平面的高度),perPositionHeight为true时有效(未设置时以鼠标添加的第一个点高程作为底部高程),否则以鼠标实时点击的每个点高程为准

[options.isUnderground] Boolean false

是否是地下墙(墙顶更靠近地面)

[options.perPositionHeight] Boolean true

墙角底部高程是否采用各自墙角顶点高程(墙脚高程不一样)

[options.customMaterial] CustomAreaMaterial CustomAreaMaterial.ColorMaterial

墙面自定义材质对象

[options.positions] Array.<Cartesian3>

墙面底部顶点集合

[options.updateWhenPicking] Boolean true

拾取帧中是否更新图元,该属性不会被clone方法复制

Example

var customWallPrimitive = new BOSGeo.CustomWallPrimitive({
     customMaterial: BOSGeo.CustomAreaMaterial.GridMaterial
});
geomap.scene.primitives.add(customWallPrimitive);

1.2. 属性

属性名 Type Default ReadOnly Description
id String Object true 图元id
depthTestEnabled Boolean true true 是否开启深度测试(开启则不采用深度测试失败材质)
bottomHeight Number undefined true 墙底部高程,perPositionHeight为true时有效(未设置时以positions的第一个点高程作为底部高程),否则以positions中各自顶点高程为墙角底部高程
isUnderground Boolean false true 是否是地下墙(墙顶更靠近地面)
perPositionHeight Boolean true true 墙角底部高程是否采用各自墙角顶点高程(墙脚高程不一样)
updateWhenPicking Boolean true true 拾取帧中是否更新图元,该属性不会被clone方法复制
range Rectangle true 图元范围
customMaterial CustomAreaMaterial false 墙面填充材质
wallHeight Number 10 false 墙面相对高度, 墙体相对于墙角底部高度, 值可为负但不能为零(设置零无效),单位为米
center Cartesian3 false 墙体底部质心(暂时使用矩形范围中心)

1.3. 方法

1.3.1. customWallPrimitive.clone() ⇒ CustomWallPrimitive

复制当前图元对象

1.3.2. customWallPrimitive.setPosition(positions)

设置位置

Param Type Description
positions Array.<Cartesian3>

墙体的顶点坐标

版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-07-19 11:34:25

results matching ""

    No results matching ""