M3D / M3D / Actions / TransformAction
Class: TransformAction
Memberof
M3D.Actions
Description
变换动作类
Author
YW
Date
2022-5-17
Copyright
All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd
Hierarchy
-
↳
TransformAction
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new TransformAction(): TransformAction
Returns
Description
构造函数
Inherited from
Properties
id
• id: number
Inherited from
count
▪ Static count: number
Inherited from
Methods
execute
▸ execute(): ActionState
Returns
Description
执行Action
Inherited from
getEvents
▸ getEvents(): M3DEvent[]
Returns
M3DEvent[]
Description
获得事件列表
Inherited from
getId
▸ getId(): number
Returns
number
Description
获取id
Inherited from
registerEvent
▸ registerEvent(event): void
Parameters
| Name | Type | Description |
|---|---|---|
event | M3DEvent | M3D事件 |
Returns
void
Description
注册事件
Inherited from
removeEvent
▸ removeEvent(): void
Returns
void
Description
删除事件
Inherited from
setId
▸ setId(v): void
Parameters
| Name | Type | Description |
|---|---|---|
v | number | ShapeId |
Returns
void
Description
设置id
Inherited from
rotate
▸ rotate(model, quaternion): any
Parameters
| Name | Type | Description |
|---|---|---|
model | Model | 需要旋转的模型 |
quaternion | Quaternion | 需要旋转的角度以及坐标轴形成的四元数对象 |
Returns
any
Description
旋转模型(待实现)
▸ rotate(viewport, model, angle, axisType, axis): any
Parameters
| Name | Type | Description |
|---|---|---|
viewport | Viewport | 旋转模型所在的视口对象 |
model | Model | 需要旋转的模型 |
angle | number | 需要旋转的角度 |
axisType | number | 需要旋转的坐标轴类型,0为绕X轴旋转,1为绕Y轴旋转,2为绕Z轴旋转,3为绕中心旋转 |
axis | Vector3 | 旋转的坐标轴 |
Returns
any
Description
旋转模型(待实现)
scale
▸ scale(model, scale): void
Parameters
| Name | Type | Description |
|---|---|---|
model | Model | 需要缩放的模型 |
scale | Vector3 | 缩放比例以及方向 |
Returns
void
Description
缩放模型(待实现)
translate
▸ translate(model, direction): void
Parameters
| Name | Type | Description |
|---|---|---|
model | Model | 需要平移的模型对象(待实现) |
direction | Vector3 | 需要平移的方向以及距离 |
Returns
void
Description
平移模型