# ModelTransformTool

#### new Cesium.ModelTransformTool(layer)
MapGIS/Tools/ModelTransformTool.js 17

模型变换工具集

Name | Type | Description
--- | --- | ---
`layer` | Object | 模型对象

Author:
  - 基础平台-杨琨

### Methods

#### activeRotationEditor()
MapGIS/Tools/ModelTransformTool.js 305

可视化旋转工具

#### activeScaleEditor(options)
MapGIS/Tools/ModelTransformTool.js 334

可视化缩放工具

Name | Type | Default | Description
--- | --- | --- | ---

`options`

Object

`{}`

optional 工具参数

Name | Type | Default | Description
--- | --- | --- | ---
`singleScale` | boolean | `false` | optional 是否单轴缩放，true：单轴缩放，false：三轴同时缩放

#### activeTranslationEditor()
MapGIS/Tools/ModelTransformTool.js 318

可视化平移工具

#### deactivate()
MapGIS/Tools/ModelTransformTool.js 350

取消激活可视化工具

#### destroy()
MapGIS/Tools/ModelTransformTool.js 360

销毁工具

#### initModelEditor(viewer)
MapGIS/Tools/ModelTransformTool.js 246

初始化可视化模型变换工具

Name | Type | Description
--- | --- | ---
`viewer` | Viewer | Cesium的viewer对象

#### reset()
MapGIS/Tools/ModelTransformTool.js 377

重置模型位置到初始状态

#### setRotation(degree, axis)
MapGIS/Tools/ModelTransformTool.js 106

模型旋转

Name | Type | Default | Description
--- | --- | --- | ---
`degree` | Number | `0` | optional 旋转角度，单位度
`axis` | String | `'Z'` | optional 旋转轴，X：X轴，Y：Y轴，Z：Z轴

#### setScala(x, y, z)
MapGIS/Tools/ModelTransformTool.js 221

模型缩放

Name | Type | Default | Description
--- | --- | --- | ---
`x` | Number | `1` | optional x轴放大
`y` | Number | `1` | optional y轴放大
`z` | Number | `1` | optional z轴放大

#### setTranslation(longitude, latitude, height)
MapGIS/Tools/ModelTransformTool.js 179

模型平移

Name | Type | Default | Description
--- | --- | --- | ---
`longitude` | Number | `0` | optional 经度
`latitude` | Number | `0` | optional 纬度
`height` | Number | `0` | optional 高度