ClipPlane

new ClipPlane(viewer3D)

裁切工具类
Name Type Description
viewer3D Viewer3D 入口程序

Members

_entities : EntityCollection

裁切所有Entity实体集合,存放Entity

_tilesetsMap : Object

所有tileset的对象

clipType : number

裁切类型 1横切 2纵切 3挖洞

dataSource : CustomDataSource

裁切所有实体集合,存放EntityCollection defaultId:hy_clippingPlanes_datasource 可以通过id 删除datasouce

hole : Object

挖洞属性
Properties:
Name Type Description
width Object 挖洞宽度
deep Object 挖洞深度
hasTopPlane Object 挖洞是否封顶 (TODO 暂留,采样点不能够采集桥下坐标点,暂时不用)

labels : LabelCollection

裁切所有Label实体集合,存放Label

viewer : Viewer

viewer3D.viewer 主视图对象

Methods

addLabel(position, mark)Entity

添加label 单独使用请参考 see viewer3d.drawTool DrawTool.addLabel
Name Type Description
position Cartesian3 地心坐标 {x:1,y:1,z:1}
mark String label标记用户区分不同模块方便进行操作
Returns:
label 对象

addSingleClippingPlane4Tileset(positions, tileset, type, rectPos, recover)

添加裁切面到单个tileset
Name Type Description
positions Array 地心坐标点数组 [Cartesian3,...]
tileset Cesium3Dtileset 单个tileset
type Number see clipMode
rectPos Array 挖洞地心数组 [Cartesian3,Cartesian3,Cartesian3,Cartesian3] 矩形区域四个顶点
recover Boolean 是否覆盖原来裁切面

clean()

清空场景

createClippingHole(positions, tilesetsMap, nodesMap, width, deep)

挖洞
Name Type Description
positions Array 地心坐标数组 [Cartesian3,....]
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset
nodesMap Object 图层节点对象map see LayerManager#_path2Node
width Number optional @default:10m
deep Number optional @default:5m

createLandscapeClippingPlane(positions, tilesetsMap, nodesMap)

创建横向裁切面
Name Type Description
positions Array 坐标点数组 [Cartesian3,....]
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset
nodesMap Object 图层节点的map对象 see LayerManager#_path2Node

createVerticalClippingPlane(positions, tilesetsMap, nodesMap)

创建竖裁切面
Name Type Description
positions Array 坐标点数组 [Cartesian3,....]
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset
nodesMap Object 图层节点的map对象 see LayerManager#_path2Node

moveBack(moveDistance, tilesetsMap)

向后移动
Name Type Description
moveDistance Number 移动的距离
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset

moveForward(moveDistance, tilesetsMap)

向前移动
Name Type Description
moveDistance Number 移动的距离
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset

offsetPositionHeight(position, height)Object

获取横切面位置及高程信息
Name Type Description
position Cartesian3 地心坐标 {x:1,y:1,z:1}
height Number 偏离position的高度值
Returns:
坐标和高度信息 {{cartesian3: *, height: number}}

turnLeft(angle, tilesetsMap)

向左旋转
Name Type Description
angle Number 旋转角度
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset

turnRight(angle, tilesetsMap)

向右旋转
Name Type Description
angle Number 旋转角度
tilesetsMap Object tilesets的map对象 see TilesetProcessor#_path2Tileset