跳到主要内容
版本:v10.0

M3D / M3D / Animation / AnimationAPI

Class: AnimationAPI

M3D.Animation.AnimationAPI

Memberof

M3D.Animation

Description

动画仿真相关操作接口类

Author

YF

Export

Table of contents

Constructors

Methods

Constructors

constructor

new AnimationAPI(): AnimationAPI

Returns

AnimationAPI

Methods

AddCameraPosRotFollowPathKeyFrame

AddCameraPosRotFollowPathKeyFrame(pivot, aPathPoint, aPathQuat, fScale, fIntWind, bLiner, iTime, pAnimation): boolean

Parameters

NameType
pivotVector3
aPathPointVector3[]
aPathQuatQuaternion[]
fScalenumber
fIntWindnumber[]
bLinerboolean
iTimenumber
pAnimationAnimation

Returns

boolean

Description

添加相机的位置、旋转、缩放路径关键帧

Static

Memberof

AnimationAPI


AddInsPosRotFollowPathKeyFrame

AddInsPosRotFollowPathKeyFrame(strPlcID, strName, aPathPoint, aPathqUuat, center, iTime, pAnimation): boolean

Parameters

NameTypeDescription
strPlcIDstring实例的PLCPath
strNamestring名称
aPathPointVector3[]
aPathqUuatQuaternion[]
centerVector3
iTimenumber
pAnimationAnimation

Returns

boolean

Description

添加实例的位置、旋转、缩放路径关键帧

Static

Memberof

AnimationAPI


RecPathCamera

RecPathCamera(strPlcID, strName, pivot, fMtxAA, fScale, fIntWind, bUseAutoKey, bLiner, pAnimation): boolean

Parameters

NameType
strPlcIDstring
strNamestring
pivotVector3
fMtxAAnumber[][]
fScalenumber
fIntWindnumber[]
bUseAutoKeyboolean
bLinerboolean
pAnimationAnimation

Returns

boolean

Static

Memberof

AnimationAPI


addRecInsPosRotKeyFrame

addRecInsPosRotKeyFrame(strPlcID, strObjName, pntCenterPnt, pntPos, qual, bAddNewKey, bLiner, bFollowPath, bUpdateKeyEditor, pAnimation, pFolderAnimation): boolean

Parameters

NameType
strPlcIDstring
strObjNamestring
pntCenterPntVector3
pntPosVector3
qualQuaternion
bAddNewKeyboolean
bLinerboolean
bFollowPathboolean
bUpdateKeyEditorboolean
pAnimationAnimation
pFolderAnimationAnimation

Returns

boolean

Static

Memberof

AnimationAPI


getFollowPathAutoKeyFrameNum

getFollowPathAutoKeyFrameNum(aPathPoint, iTime, pBehaviorAction): any[]

Parameters

NameType
aPathPointany[]
iTimenumber
pBehaviorActionBehaviorManager

Returns

any[]

Static

Memberof

AnimationAPI


importChildAnimation

importChildAnimation(pSAManager, strInsPlcPath, view): void

Parameters

NameType
pSAManagerSimulationAnimationManager
strInsPlcPathstring
viewScene

Returns

void

Description

导入子件动画

Static

Memberof

AnimationAPI


importChildAnimationInitState

importChildAnimationInitState(pSAManager, strInsPlcPath): boolean

Parameters

NameType
pSAManagerSimulationAnimationManager
strInsPlcPathstring

Returns

boolean

Description

导入子件动画初始状态

Static

Memberof

AnimationAPI


importProcess

importProcess(pParentProcessManager, pCurProcess): ChildAnimationProcess

Parameters

NameType
pParentProcessManagerProcessManager
pCurProcessProcess

Returns

ChildAnimationProcess

Description

导入过程

Static

Memberof

AnimationAPI


importProcessManager

importProcessManager(pParentProcessManager, pCurProcessManager, strInsPlcPath): ProcessManager

Parameters

NameType
pParentProcessManagerProcessManager
pCurProcessManagerProcessManager
strInsPlcPathstring

Returns

ProcessManager

Description

导入过程管理器

Static

Memberof

AnimationAPI


isEnableRec

isEnableRec(pBehaviorAction): boolean

Parameters

NameType
pBehaviorActionBehaviorManager

Returns

boolean

Description

判断是否处于可录制状态

Static

Memberof

AnimationAPI


isInsCanRecToCurAni

isInsCanRecToCurAni(strPlcID): boolean

Parameters

NameTypeDescription
strPlcIDstring路径ID

Returns

boolean

是否可以录制到当前动画中

Description

配置路径路径判断当是否可以录制到当前动画中。用于检测选中实例是否可以录制到子动画中

Static

Memberof

AnimationAPI


recCamera

recCamera(strPlcID, strName, pivot, fMtxAA, fScale, fIntWind, bUseAutoKey, bLiner, pBehaviorAction): boolean

Parameters

NameType
strPlcIDstring
strNamestring
pivotVector3
fMtxAAany[][]
fScalenumber
fIntWindany[]
bUseAutoKeyboolean
bLinerboolean
pBehaviorActionBehaviorManager

Returns

boolean

Static

Memberof

AnimationAPI


recCameraPosRotFollowPath

recCameraPosRotFollowPath(pivot, aPathPoint, aPathQuat, fScale, fIntWind, bLiner, iTime, pBehaviorAction): boolean

Parameters

NameType
pivotVector3
aPathPointany[]
aPathQuatany[]
fScalenumber
fIntWindany[]
bLinerboolean
iTimenumber
pBehaviorActionBehaviorManager

Returns

boolean

Description

沿轨迹线移动录制接口

Static

Memberof

AnimationAPI


recInsPosRot

recInsPosRot(strPlcID, strObjName, pntCenterPnt, pntPos, qual, bAddNewKey, bLiner, bFollowPath, bUpdateKeyEditor, pBehaviorAction): boolean

Parameters

NameTypeDescription
strPlcIDstring模型配置路径
strObjNamestring模型名称
pntCenterPntVector3旋转中心点
pntPosVector3模型位置信息
qualQuaternion模型旋转信息
bAddNewKeyboolean是否添加一个新的帧
bLinerboolean
bFollowPathboolean
bUpdateKeyEditorboolean
pBehaviorActionBehaviorManager

Returns

boolean

是否录制成功

Description

录制平移旋转动画

Static

Memberof

AnimationAPI


recInsPosRotFollowPath

recInsPosRotFollowPath(strPlcID, strName, aPathPoint, aPathQuat, aInsCenter, iTime, behaviorAction): boolean

Parameters

NameType
strPlcIDstring
strNamestring
aPathPointany[]
aPathQuatany[]
aInsCenterany[]
iTimenumber
behaviorActionBehaviorManager

Returns

boolean

Static

Memberof

AnimationAPI