AR_Engine_SDK
Functions | Variables
XEAnimatableModelComponent.lua File Reference
类 XEAnimatableModelComponent 继承关系图:
Inheritance graph
类 XEAnimatableModelComponent::ModelAnimController 继承关系图:
Inheritance graph

Functions

function XEAnimatableModelComponent__AnimLayerData new () end
 
function XEAnimatableModelComponent__ModelAnimController new (pModelComponent) end
 
function XEAnimatableModelComponent__ModelAnimController Tick (fInterval) end
 
function XEAnimatableModelComponent__ModelAnimController GetTimeLength () end
 
function XEAnimatableModelComponent__ModelAnimController SetTime (nTime) end
 
function XEAnimatableModelComponent__ModelAnimController GetPrimitiveAnimController () end
 
function XEAnimatableModelComponent__ModelAnimController AssignCustomPrimitiveAnimController (pPlayer) end
 
function XEAnimatableModelComponent__ModelAnimController GetCustomPrimitiveAnimController () end
 
function XEAnimatableModelComponent__ModelAnimController SetAnimEndTime (fEndTime) end
 
function XEAnimatableModelComponent__ModelAnimController GetSequenceDuration (pSeqName) end
 
function XEAnimatableModelComponent__ModelAnimController GetBlendSequenceDuration (pBlendLayerName, pSeqName) end
 
function XEAnimatableModelComponent__ModelAnimController ActiveAllLayers () end
 
function XEAnimatableModelComponent__ModelAnimController DeactiveAllLayers () end
 
function XEAnimatableModelComponent__ModelAnimController SetAnimatableModelComponent (pCmp) end
 
function XEAnimatableModelComponent__ModelAnimController GetAnimatableModelComponent () end
 
function XEAnimatableModelComponent__ModelAnimController Play () end
 
function XEAnimatableModelComponent__ModelAnimController Resume () end
 
function XEAnimatableModelComponent__ModelAnimController Stop () end
 
function XEAnimatableModelComponent__ModelAnimController Pause () end
 
function XEAnimatableModelComponent LoadAsset (pPath) end
 
function XEAnimatableModelComponent Release () end
 
function XEAnimatableModelComponent Empty () end
 
function XEAnimatableModelComponent Tick (fDel, bForceTick) end
 
function XEAnimatableModelComponent Render (pViewport) end
 
function XEAnimatableModelComponent AssignAnimationController () end
 
function XEAnimatableModelComponent GetAnimController () end
 
function XEAnimatableModelComponent GetExplicitAnimationController () end
 
function XEAnimatableModelComponent GetCurPlayAnimation () end
 
function XEAnimatableModelComponent AddAnimSequence (pPath, bActive, bPlay, bExclusively, bIsMontageAsset) end
 
function XEAnimatableModelComponent AddAnimBlendSequence (pLayerName, pPath, fStartTime, fEndTime, eBlendType, bActive, bPlay, bExclusively) end
 
function XEAnimatableModelComponent SetAnimBlendTime (pLayerName, pPath, fStartTime, fEndTime) end
 
function XEAnimatableModelComponent AddLayer (pLayerName, bActive, bPlay, bExclusively) end
 
function XEAnimatableModelComponent RemoveAllAnimSequence () end
 
function XEAnimatableModelComponent ActiveLayer (pLayerName, bPlay, bExclusively) end
 
function XEAnimatableModelComponent ActiveAllLayers (bPlay) end
 
function XEAnimatableModelComponent DeacitveLayer (pLayerName) end
 
function XEAnimatableModelComponent DeacitveAllLayers () end
 
function XEAnimatableModelComponent HasActiveLayer () end
 
function XEAnimatableModelComponent HasLayer (pLayerName) end
 
function XEAnimatableModelComponent GetFirstActiveLayerName () end
 
function XEAnimatableModelComponent GetAnimLayerData (pLayerName) end
 
function XEAnimatableModelComponent GetAnimLayerData (nLayerIndex) end
 
function XEAnimatableModelComponent GetAnimLayerArray () end
 
function XEAnimatableModelComponent SetUsedAsPlayer (bUsedAsPlayer) end
 
function XEAnimatableModelComponent IsUsedAsPlayer () end
 
function XEAnimatableModelComponent SetCucolorisColor (color) end
 
function XEAnimatableModelComponent GetCucolorisColor () end
 
function XEAnimatableModelComponent LoadPhysicalAsset (pPath) end
 
function XEAnimatableModelComponent LoadPhysicalAsset (pPath, eType) end
 
function XEAnimatableModelComponent RemovePhysicalAsset () end
 
function XEAnimatableModelComponent SetRenderBodyShapeDebug (bRender) end
 
function XEAnimatableModelComponent IsRenderBodyShapeDebug () end
 
function XEAnimatableModelComponent BuildPhysicsSkeletalRootInstance () end
 
function XEAnimatableModelComponent DestroyPhysicsSkeletalRootInstance () end
 
function XEAnimatableModelComponent SetIXSkeletalPhysicsInstance (pIns) end
 
function XEAnimatableModelComponent GetIXSkeletalPhysicsInstance () end
 
function XEAnimatableModelComponent GetPhysicsSkeletalRootInstance () end
 
function XEAnimatableModelComponent CreateSkeletalPhysicsInstance () end
 
function XEAnimatableModelComponent IsInnerPrimitiveAnimController () end
 
function XEAnimatableModelComponent MarkAsInnerPrimitiveAnimController (bMark) end
 

Variables

 XEAnimatableModelComponent = {}
 
 XEAnimatableModelComponent__AnimLayerData = {}
 
XEAnimatableModelComponent AnimLayerData = XEAnimatableModelComponent__AnimLayerData
 
XEAnimatableModelComponent__AnimLayerData AnimLayerDataIndexNone = 0
 
XEAnimatableModelComponent__AnimLayerData AnimLayerDataIndexNotSet = 0
 
XEAnimatableModelComponent__AnimLayerData nLayerIndex = 0
 @type number 索引 More...
 
XEAnimatableModelComponent__AnimLayerData szPath = ''
 @type string 路径 More...
 
XEAnimatableModelComponent__AnimLayerData bActive = false
 @type boolean 是否被激活 More...
 
XEAnimatableModelComponent__AnimLayerData bIsMontageAsset = false
 @type boolean 是否是蒙太奇资源 More...
 

Function Documentation

◆ ActiveAllLayers() [1/2]

激活所有层

Returns
void

◆ ActiveAllLayers() [2/2]

function XEAnimatableModelComponent ActiveAllLayers ( bPlay  )

激活所有层

Parameters
bPlayboolean
Returns
void

◆ ActiveLayer()

function XEAnimatableModelComponent ActiveLayer ( pLayerName  ,
bPlay  ,
bExclusively   
)

激活一个动画层

Parameters
pLayerNamestring 要激活的层name
bPlayboolean 是否自动播放
bExclusivelyboolean 是否仅激活一个Layer,如果为true,表示当前仅激活一个layer,其他都置为非激活态
Returns
void

◆ AddAnimBlendSequence()

function XEAnimatableModelComponent AddAnimBlendSequence ( pLayerName  ,
pPath  ,
fStartTime  ,
fEndTime  ,
eBlendType  ,
bActive  ,
bPlay  ,
bExclusively   
)

添加融合动画资源到动画控制器的某一层上

Parameters
pLayerNamestring 要添加动画的层
pPathstring 动画资源路径
fStartTimenumber 设置添加的动画开始时间
fEndTimenumber 设置添加的动画结束时间
eBlendTypenumber 动画融合类型
bActiveboolean 是否激活所在的Layer
bPlayboolean 是否自动播放
bExclusivelyboolean 是否仅激活一个Layer,如果为true,表示当前仅激活一个layer,其他都置为非激活态
Returns
XAnimMultiLayer 动画控制器(具有多层动画的控制器)

◆ AddAnimSequence()

function XEAnimatableModelComponent AddAnimSequence ( pPath  ,
bActive  ,
bPlay  ,
bExclusively  ,
bIsMontageAsset   
)

添加seq动画资源到动画控制器上

Parameters
pPathstring 动画资源路径
bActiveboolean 是否激活所在的Layer
bPlayboolean 是否自动播放
bExclusivelyboolean 是否仅激活一个Layer,如果为true,表示当前仅激活一个layer,其他都置为非激活态
bIsMontageAssetboolean 添加的是否是蒙太奇中的seq动画(一般由上层其他调用的地方传下来)
Returns
XAnimMultiLayer 动画控制器(具有多层动画的控制器)

◆ AddLayer()

function XEAnimatableModelComponent AddLayer ( pLayerName  ,
bActive  ,
bPlay  ,
bExclusively   
)

添加一个空层(不加动画资源)

Parameters
pLayerNamestring 要添加的层name
bActiveboolean 是否激活所在的Layer
bPlayboolean 是否自动播放
bExclusivelyboolean 是否仅激活一个Layer,如果为true,表示当前仅激活一个layer,其他都置为非激活态
Returns
XAnimMultiLayer

◆ AssignAnimationController()

function XEAnimatableModelComponent AssignAnimationController ( )

如果不存在动画控制器,创建一个动画控制器,并返回

Returns
XEAnimController

◆ AssignCustomPrimitiveAnimController()

function XEAnimatableModelComponent__ModelAnimController AssignCustomPrimitiveAnimController ( pPlayer  )

从外部设置原始动画播放控制器

Parameters
pPlayerXAnimMultiLayer 外部已经创建好的控制器
Returns
void
Attention
一般来说,pPlayer要在外部维护释放删除

◆ BuildPhysicsSkeletalRootInstance()

function XEAnimatableModelComponent BuildPhysicsSkeletalRootInstance ( )

创建物理骨骼根实例

Returns
void

◆ CreateSkeletalPhysicsInstance()

function XEAnimatableModelComponent CreateSkeletalPhysicsInstance ( )

创建骨骼物理实例指针

Returns
boolean

◆ DeacitveAllLayers()

function XEAnimatableModelComponent DeacitveAllLayers ( )

把所有动画层设为非激活态

Returns
void

◆ DeacitveLayer()

function XEAnimatableModelComponent DeacitveLayer ( pLayerName  )

把某一动画层设置为不激活态

Parameters
pLayerNamestring 要去激活的层name
Returns
void

◆ DeactiveAllLayers()

function XEAnimatableModelComponent__ModelAnimController DeactiveAllLayers ( )

把所有层设为非激活态

Returns
void

◆ DestroyPhysicsSkeletalRootInstance()

function XEAnimatableModelComponent DestroyPhysicsSkeletalRootInstance ( )

销毁物理骨骼根实例

Returns
boolean

◆ Empty()

function XEAnimatableModelComponent Empty ( )

清空当前组件,包括移除各个实例、移除布料、清空播放列表等

Returns
void

◆ GetAnimatableModelComponent()

function XEAnimatableModelComponent__ModelAnimController GetAnimatableModelComponent ( )

获取动画模型组件指针

Returns
XEAnimatableModelComponent

◆ GetAnimController()

function XEAnimatableModelComponent GetAnimController ( )

获取动画控制器(蒙太奇动画控制器或者seq动画控制器)

Returns
XEAnimController

◆ GetAnimLayerArray()

function XEAnimatableModelComponent GetAnimLayerArray ( )

获取层数据列表

Returns
AnimLayerData[]

◆ GetAnimLayerData() [1/2]

function XEAnimatableModelComponent GetAnimLayerData ( pLayerName  )

通过层name获取到层数据AnimLayerData

Parameters
pLayerNamestring
Returns
XEAnimatableModelComponent__AnimLayerData

◆ GetAnimLayerData() [2/2]

function XEAnimatableModelComponent GetAnimLayerData ( nLayerIndex  )

通过层索引获取到层数据AnimLayerData

Parameters
nLayerIndexnumber
Returns
XEAnimatableModelComponent__AnimLayerData

◆ GetBlendSequenceDuration()

function XEAnimatableModelComponent__ModelAnimController GetBlendSequenceDuration ( pBlendLayerName  ,
pSeqName   
)

获取融合动画层某一资源的长度

Parameters
pBlendLayerNamestring 融合层名称
pSeqNamestring 动画资源名称
Returns
number

◆ GetCucolorisColor()

function XEAnimatableModelComponent GetCucolorisColor ( )

XEAnimatableModelComponent_GetCucolorisColor00

Returns
XCOLORBASE

◆ GetCurPlayAnimation()

function XEAnimatableModelComponent GetCurPlayAnimation ( )

获取当前播放的动画名称或所在层名称

Returns
string

◆ GetCustomPrimitiveAnimController()

function XEAnimatableModelComponent__ModelAnimController GetCustomPrimitiveAnimController ( )

获取原始动画播放控制器

Returns
XAnimMultiLayer

◆ GetExplicitAnimationController()

function XEAnimatableModelComponent GetExplicitAnimationController ( )

获取动画控制器(seq动画控制器)

Returns
XEAnimController

◆ GetFirstActiveLayerName()

function XEAnimatableModelComponent GetFirstActiveLayerName ( )

获取到第一个激活状态的层

Returns
string 如果取到,返回层name,没有取到,返回NULL

◆ GetIXSkeletalPhysicsInstance()

function XEAnimatableModelComponent GetIXSkeletalPhysicsInstance ( )

获取骨骼物理实例指针

Returns
IXSkeletalPhysicsInstance 骨骼物理实例指针

◆ GetPhysicsSkeletalRootInstance()

function XEAnimatableModelComponent GetPhysicsSkeletalRootInstance ( )

获取物理骨骼根实例

Returns
XEPhysicsSkeletalRootInstance 物理骨骼根实例指针

◆ GetPrimitiveAnimController()

function XEAnimatableModelComponent__ModelAnimController GetPrimitiveAnimController ( )

获取原始动画播放控制器

Returns
XAnimMultiLayer

◆ GetSequenceDuration()

function XEAnimatableModelComponent__ModelAnimController GetSequenceDuration ( pSeqName  )

获取动画资源长度

Parameters
pSeqNamestring 动画资源名称
Returns
number

◆ GetTimeLength()

获取动画时长

Returns
number

◆ HasActiveLayer()

function XEAnimatableModelComponent HasActiveLayer ( )

判断当前是否有激活态的层

Returns
boolean 如果有,返回true,没有,返回false

◆ HasLayer()

function XESceneARAdsVideoComponent HasLayer ( pLayerName  )

判断当前是否有某一层

Parameters
pLayerNamestring 要判断的层name
Returns
boolean 如果有,返回true,没有,返回false

根据Layer name判断是否有Layer

Parameters
pLayerNamestring
Returns
boolean

◆ IsInnerPrimitiveAnimController()

function XEAnimatableModelComponent IsInnerPrimitiveAnimController ( )

是否是内部创建的原始动画控制器

Returns
boolean

◆ IsRenderBodyShapeDebug()

function XEAnimatableModelComponent IsRenderBodyShapeDebug ( )

获取是否渲染所有刚体的状态

Returns
boolean

◆ IsUsedAsPlayer()

function XEAnimatableModelComponent IsUsedAsPlayer ( )

XEAnimatableModelComponent_IsUsedAsPlayer00

Returns
boolean

◆ LoadAsset()

function XEAnimatableModelComponent LoadAsset ( pPath  )

加载资源

Parameters
pPathstring 资源路径
Returns
boolean 是否加载成功

◆ LoadPhysicalAsset() [1/2]

function XEAnimatableModelComponent LoadPhysicalAsset ( pPath  )

加载物理资源

Parameters
pPathstring 资源路径
Returns
boolean 动画播放列表指针

◆ LoadPhysicalAsset() [2/2]

function XEAnimatableModelComponent LoadPhysicalAsset ( pPath  ,
eType   
)

XEAnimatableModelComponent_LoadPhysicalAsset01

Parameters
pPathstring
eTypenumber
Returns
boolean

◆ MarkAsInnerPrimitiveAnimController()

function XEAnimatableModelComponent MarkAsInnerPrimitiveAnimController ( bMark  )

标记为是否是内部创建的原始动画控制器

Parameters
bMarkboolean xtrue:内部创建的,不需要手动释放;xfalse:外部创建的,需要外部自己释放
Returns
void

◆ new() [1/2]

XEAnimatableModelComponent_AnimLayerData_new00

Returns
XEAnimatableModelComponent__AnimLayerData

XEAnimatableModelComponent_new00

Returns
XEAnimatableModelComponent

XEAnimatableModelComponent_ModelAnimController_new00

Returns
XEAnimatableModelComponent__ModelAnimController

◆ new() [2/2]

function XEAnimatableModelComponent__ModelAnimController new ( pModelComponent  )

XEAnimatableModelComponent_ModelAnimController_new01

Parameters
pModelComponentXEAnimatableModelComponent
Returns
XEAnimatableModelComponent__ModelAnimController

◆ Pause()

动画暂停播放

Returns
void

◆ Play()

动画从头开始播放

Returns
void

◆ Release()

function XEAnimatableModelComponent Release ( )

释放资源

Returns
void

◆ RemoveAllAnimSequence()

function XEAnimatableModelComponent RemoveAllAnimSequence ( )

移除当前动画控制器的所有层的所有动画资源

Returns
void

◆ RemovePhysicalAsset()

function XEAnimatableModelComponent RemovePhysicalAsset ( )

移除物理资源

Returns
boolean

◆ Render()

function XEAnimatableModelComponent Render ( pViewport  )

渲染当前组件,此函数每帧都会被 XEActor 调用

Parameters
pViewportXEViewport
Returns
void

◆ Resume()

动画继续播放

Returns
void

◆ SetAnimatableModelComponent()

function XEAnimatableModelComponent__ModelAnimController SetAnimatableModelComponent ( pCmp  )

设置动画模型组件指针

Parameters
pCmpXEAnimatableModelComponent
Returns
void

◆ SetAnimBlendTime()

function XEAnimatableModelComponent SetAnimBlendTime ( pLayerName  ,
pPath  ,
fStartTime  ,
fEndTime   
)

设置融合动画中某个片段的起始时间

Parameters
pLayerNamestring 动画所在的层name
pPathstring 动画片段资源路径
fStartTimenumber 设置动画片段开始时间
fEndTimenumber 设置动画片段结束时间
Returns
void

◆ SetAnimEndTime()

function XEAnimatableModelComponent__ModelAnimController SetAnimEndTime ( fEndTime  )

设置动画播放器结束时间

Parameters
fEndTimenumber
Returns
void

◆ SetCucolorisColor()

function XEAnimatableModelComponent SetCucolorisColor ( color  )

XEAnimatableModelComponent_SetCucolorisColor00

Parameters
colorXCOLORBASE
Returns
void

◆ SetIXSkeletalPhysicsInstance()

function XEAnimatableModelComponent SetIXSkeletalPhysicsInstance ( pIns  )

骨骼物理实例指针指向pIns

Parameters
pInsIXSkeletalPhysicsInstance 外部创建的骨骼物理实例
Returns
void

◆ SetRenderBodyShapeDebug()

function XEAnimatableModelComponent SetRenderBodyShapeDebug ( bRender  )

设置是否渲染所有刚体

Parameters
bRenderboolean 是否渲染
Returns
void

◆ SetTime()

更新动画

Parameters
nTimenumber 当前时刻
Returns
void

◆ SetUsedAsPlayer()

function XEAnimatableModelComponent SetUsedAsPlayer ( bUsedAsPlayer  )

XEAnimatableModelComponent_SetUsedAsPlayer00

Parameters
bUsedAsPlayerboolean
Returns
void

◆ Stop()

动画停止播放

Returns
void

◆ Tick() [1/2]

function XEAnimatableModelComponent__ModelAnimController Tick ( fInterval  )

更新动画控制器

Parameters
fIntervalnumber 帧间隔
Returns
void

◆ Tick() [2/2]

function XEAnimatableModelComponent Tick ( fDel  ,
bForceTick   
)

更新动画控制器

Parameters
fDelnumber
bForceTickboolean
Returns
void

Variable Documentation

◆ AnimLayerData

◆ AnimLayerDataIndexNone

XEAnimatableModelComponent__AnimLayerData AnimLayerDataIndexNone = 0

◆ AnimLayerDataIndexNotSet

XEAnimatableModelComponent__AnimLayerData AnimLayerDataIndexNotSet = 0

◆ bActive

@type boolean 是否被激活

◆ bIsMontageAsset

@type boolean 是否是蒙太奇资源

◆ nLayerIndex

@type number 索引

◆ szPath

@type string 路径

◆ XEAnimatableModelComponent

◆ XEAnimatableModelComponent__AnimLayerData