ModelTransformTool

new Cesium.ModelTransformTool(layer)

模型变换工具集
Name Type Description
layer Object 模型对象
Author:
  • 基础平台-杨琨

Methods

可视化旋转工具

activeScaleEditor(options)

可视化缩放工具
Name Type Default Description
options Object {} optional 工具参数
Name Type Default Description
singleScale boolean false optional 是否单轴缩放,true:单轴缩放,false:三轴同时缩放

activeTranslationEditor()

可视化平移工具
销毁工具

initModelEditor(viewer)

初始化可视化模型变换工具
Name Type Description
viewer Viewer Cesium的viewer对象

setRotation(degree, axis)

模型旋转
Name Type Default Description
degree Number 0 optional 旋转角度,单位度
axis String 'Z' optional 旋转轴,X:X轴,Y:Y轴,Z:Z轴
模型缩放
Name Type Default Description
x Number 1 optional x轴放大
y Number 1 optional y轴放大
z Number 1 optional z轴放大

setTranslation(longitude, latitude, height)

模型平移
Name Type Default Description
longitude Number 0 optional 经度
latitude Number 0 optional 纬度
height Number 0 optional 高度