M3D / M3D / Animation / AnimationAPI
Class: AnimationAPI
Memberof
M3D.Animation
Description
动画仿真相关操作接口类
Author
YF
Export
Table of contents
Constructors
Methods
- AddCameraPosRotFollowPathKeyFrame
- AddInsPosRotFollowPathKeyFrame
- RecPathCamera
- addRecInsPosRotKeyFrame
- getFollowPathAutoKeyFrameNum
- importChildAnimation
- importChildAnimationInitState
- importProcess
- importProcessManager
- isEnableRec
- isInsCanRecToCurAni
- recCamera
- recCameraPosRotFollowPath
- recInsPosRot
- recInsPosRotFollowPath
Constructors
constructor
• new AnimationAPI(): AnimationAPI
Returns
Methods
AddCameraPosRotFollowPathKeyFrame
▸ AddCameraPosRotFollowPathKeyFrame(pivot
, aPathPoint
, aPathQuat
, fScale
, fIntWind
, bLiner
, iTime
, pAnimation
): boolean
Parameters
Name | Type |
---|---|
pivot | Vector3 |
aPathPoint | Vector3 [] |
aPathQuat | Quaternion [] |
fScale | number |
fIntWind | number [] |
bLiner | boolean |
iTime | number |
pAnimation | Animation |
Returns
boolean
Description
添加相机的位置、旋转、缩放路径关键帧
Static
Memberof
AnimationAPI
AddInsPosRotFollowPathKeyFrame
▸ AddInsPosRotFollowPathKeyFrame(strPlcID
, strName
, aPathPoint
, aPathqUuat
, center
, iTime
, pAnimation
): boolean
Parameters
Name | Type | Description |
---|---|---|
strPlcID | string | 实例的PLCPath |
strName | string | 名称 |
aPathPoint | Vector3 [] | |
aPathqUuat | Quaternion [] | |
center | Vector3 | |
iTime | number | |
pAnimation | Animation |
Returns
boolean
Description
添加实例的位置、旋转、缩放路径关键帧
Static
Memberof
AnimationAPI
RecPathCamera
▸ RecPathCamera(strPlcID
, strName
, pivot
, fMtxAA
, fScale
, fIntWind
, bUseAutoKey
, bLiner
, pAnimation
): boolean
Parameters
Name | Type |
---|---|
strPlcID | string |
strName | string |
pivot | Vector3 |
fMtxAA | number [][] |
fScale | number |
fIntWind | number [] |
bUseAutoKey | boolean |
bLiner | boolean |
pAnimation | Animation |
Returns
boolean
Static
Memberof
AnimationAPI
addRecInsPosRotKeyFrame
▸ addRecInsPosRotKeyFrame(strPlcID
, strObjName
, pntCenterPnt
, pntPos
, qual
, bAddNewKey
, bLiner
, bFollowPath
, bUpdateKeyEditor
, pAnimation
, pFolderAnimation
): boolean
Parameters
Name | Type |
---|---|
strPlcID | string |
strObjName | string |
pntCenterPnt | Vector3 |
pntPos | Vector3 |
qual | Quaternion |
bAddNewKey | boolean |
bLiner | boolean |
bFollowPath | boolean |
bUpdateKeyEditor | boolean |
pAnimation | Animation |
pFolderAnimation | Animation |
Returns
boolean
Static
Memberof
AnimationAPI
getFollowPathAutoKeyFrameNum
▸ getFollowPathAutoKeyFrameNum(aPathPoint
, iTime
, pBehaviorAction
): any
[]
Parameters
Name | Type |
---|---|
aPathPoint | any [] |
iTime | number |
pBehaviorAction | BehaviorManager |
Returns
any
[]
Static
Memberof
AnimationAPI
importChildAnimation
▸ importChildAnimation(pSAManager
, strInsPlcPath
, view
): void
Parameters
Name | Type |
---|---|
pSAManager | SimulationAnimationManager |
strInsPlcPath | string |
view | Scene |
Returns
void
Description
导入子件动画
Static
Memberof
AnimationAPI
importChildAnimationInitState
▸ importChildAnimationInitState(pSAManager
, strInsPlcPath
): boolean
Parameters
Name | Type |
---|---|
pSAManager | SimulationAnimationManager |
strInsPlcPath | string |
Returns
boolean
Description
导入子件动画初始状态
Static
Memberof
AnimationAPI
importProcess
▸ importProcess(pParentProcessManager
, pCurProcess
): ChildAnimationProcess
Parameters
Name | Type |
---|---|
pParentProcessManager | ProcessManager |
pCurProcess | Process |
Returns
Description
导入过程
Static
Memberof
AnimationAPI
importProcessManager
▸ importProcessManager(pParentProcessManager
, pCurProcessManager
, strInsPlcPath
): ProcessManager
Parameters
Name | Type |
---|---|
pParentProcessManager | ProcessManager |
pCurProcessManager | ProcessManager |
strInsPlcPath | string |
Returns
Description
导入过程管理器
Static
Memberof
AnimationAPI
isEnableRec
▸ isEnableRec(pBehaviorAction
): boolean
Parameters
Name | Type |
---|---|
pBehaviorAction | BehaviorManager |
Returns
boolean
Description
判断是否处于可录制状态
Static
Memberof
AnimationAPI
isInsCanRecToCurAni
▸ isInsCanRecToCurAni(strPlcID
): boolean
Parameters
Name | Type | Description |
---|---|---|
strPlcID | string | 路径ID |
Returns
boolean
是否可以录制到当前动画中
Description
配置路径路径判断当是否可以录制到当前动画中。用于检测选中实例是否可以录制到子动画中
Static
Memberof
AnimationAPI
recCamera
▸ recCamera(strPlcID
, strName
, pivot
, fMtxAA
, fScale
, fIntWind
, bUseAutoKey
, bLiner
, pBehaviorAction
): boolean
Parameters
Name | Type |
---|---|
strPlcID | string |
strName | string |
pivot | Vector3 |
fMtxAA | any [][] |
fScale | number |
fIntWind | any [] |
bUseAutoKey | boolean |
bLiner | boolean |
pBehaviorAction | BehaviorManager |
Returns
boolean
Static
Memberof
AnimationAPI
recCameraPosRotFollowPath
▸ recCameraPosRotFollowPath(pivot
, aPathPoint
, aPathQuat
, fScale
, fIntWind
, bLiner
, iTime
, pBehaviorAction
): boolean
Parameters
Name | Type |
---|---|
pivot | Vector3 |
aPathPoint | any [] |
aPathQuat | any [] |
fScale | number |
fIntWind | any [] |
bLiner | boolean |
iTime | number |
pBehaviorAction | BehaviorManager |
Returns
boolean
Description
沿轨迹线移动录制接口
Static
Memberof
AnimationAPI
recInsPosRot
▸ recInsPosRot(strPlcID
, strObjName
, pntCenterPnt
, pntPos
, qual
, bAddNewKey
, bLiner
, bFollowPath
, bUpdateKeyEditor
, pBehaviorAction
): boolean
Parameters
Name | Type | Description |
---|---|---|
strPlcID | string | 模型配置路径 |
strObjName | string | 模型名称 |
pntCenterPnt | Vector3 | 旋转中心点 |
pntPos | Vector3 | 模型位置信息 |
qual | Quaternion | 模型旋转信息 |
bAddNewKey | boolean | 是否添加一个新的帧 |
bLiner | boolean | |
bFollowPath | boolean | |
bUpdateKeyEditor | boolean | |
pBehaviorAction | BehaviorManager |
Returns
boolean
是否录制成功
Description
录制平移旋转动画
Static
Memberof
AnimationAPI
recInsPosRotFollowPath
▸ recInsPosRotFollowPath(strPlcID
, strName
, aPathPoint
, aPathQuat
, aInsCenter
, iTime
, behaviorAction
): boolean
Parameters
Name | Type |
---|---|
strPlcID | string |
strName | string |
aPathPoint | any [] |
aPathQuat | any [] |
aInsCenter | any [] |
iTime | number |
behaviorAction | BehaviorManager |
Returns
boolean
Static
Memberof
AnimationAPI