Constructor
new Glodon.Bimface.Plugins.ModelEditor.ModelEditorToolbar(ModelEditorToolbarConfig)
Parameters:
Name | Type | Description |
---|---|---|
ModelEditorToolbarConfig | Glodon.Bimface.Plugins.ModelEditor.ModelEditorToolbarConfig | 模型编辑器工具条配置项 |
Methods
exit()
退出模型编辑状态
getButtonVisibility()
获取编辑按钮可见性
Returns:
Type | Description |
---|---|
Object |
编辑按钮可见性 |
getEditedModelId()
获取被编辑模型的ID
Returns:
Type | Description |
---|---|
String |
模型文件ID |
getEditingMode()
获取当前编辑功能
Returns:
Type | Description |
---|---|
String |
编辑功能,“rotation”、“translation”、“scale” |
getRotationController()
获取旋转轴禁用状态
Returns:
Type | Description |
---|---|
Object |
Object 旋转轴禁用状态,默认为{"X":true,"Y":true,"Z":true} |
getScaleController()
获取缩放禁用状态
Returns:
Type | Description |
---|---|
Object |
缩放禁用状态,是否开启等比缩放或某轴的轴向缩放。默认为{"Uniform":true,"X":true,"Y":true,"Z":true}。 |
getTranslationController()
获取平移轴禁用状态
Returns:
Type | Description |
---|---|
Object |
Object 平移轴禁用状态,是否开启沿某轴的平移。默认为{"X":true,"Y":true,"Z":true} |
hide()
隐藏模型编辑工具条
setButtonVisibility(buttonVisibility)
设置工具条编辑状态配置
Parameters:
Name | Type | Description |
---|---|---|
buttonVisibility | Object | 编辑工具条启用状态,默认为{“translate”:true,”rotate”:true,”scale”:true} |
setEditedModelId(modelId)
根据ID设置,选择进行编辑操作的模型
Parameters:
Name | Type | Description |
---|---|---|
modelId | String | 模型文件ID |
setEditingMode(mode)
设置当前编辑功能
Parameters:
Name | Type | Description |
---|---|---|
mode | String | 编辑功能,可填“rotation”、“translation”、“scale” |
setRotationController(option)
设置旋转轴禁用状态
Parameters:
Name | Type | Description |
---|---|---|
option | Object | 旋转轴禁用状态,设置是否开启绕某轴的旋转。默认为{"X":true,"Y":true,"Z":true} |
setScaleController(option)
设置缩放禁用状态
Parameters:
Name | Type | Description |
---|---|---|
option | Object | 缩放禁用状态,设置是否开启等比缩放或某轴的轴向缩放。默认为{"Uniform":true,"X":true,"Y":true,"Z":true}。 |
setTranslationController(option)
设置平移轴禁用状态
Parameters:
Name | Type | Description |
---|---|---|
option | Object | 平移轴禁用状态,设置是否开启沿某轴的平移。默认为{"X":true,"Y":true,"Z":true} |
show()
显示模型编辑工具条