AR_Engine_SDK
载入中...
搜索中...
未找到
函数 | 变量
XEModelComponent.lua 文件参考

#include <XEModelComponent.h>

类 XEModelInsSubviewPrimitive 继承关系图:
Inheritance graph

#include <XEModelComponent.h>

类 XEModelComponent 继承关系图:
Inheritance graph

函数

function XEModelComponent LoadAssetAsync (pPath, Delegate) end
 
function XEModelComponent CreateClothAttachModel (szClothPath, pWorld, nSkinIndex) end
 
function XEModelComponent CreateClothAttachModelByPath (szClothPath, pWorld, nSkinIndex) end
 
function XEModelComponent RemoveAndReleaseClothAssetFromMesh (szMeshName) end
 
function XEModelComponent GetClothPrimitive (szMeshName) end
 
function XEModelComponent AddAllClothToSceneWithModel (pWorld) end
 
function XEModelComponent RemoveCloth (pCloth) end
 
function XEModelComponent GetClothPrimitive () end
 
function XEModelComponent GetAnimController () end
 
function XEModelComponent GetCurPlayAnimation () end
 
function XEModelComponent GetXModelFromAsset (pAssetPath) end
 
function XEModelComponent BuildSkeletonInstance () end
 
function XEModelComponent DestroySkeletonInstance () end
 
function XEModelComponent SetSkeletonInstance (pSkeleIns) end
 
function XEModelComponent AssignAnimPlayList () end
 
function XEModelComponent GetAnimPlayList () end
 
function XEModelComponent GetVertexPositionFromUV (szMeshName, szSkinName, uv) end
 
function XEModelComponent EmbedCurrentModel () end
 
function XEModelComponent EmbedCutModelSkin (szSkin, pEmbedSkinName) end
 
function XEModelComponent EmbedMeshMaterialIns (szSkin, szRawMeshName, nLod, pEmbedMatInsName) end
 
function XEModelComponent GetEmbedSkinName (szSourceSkin) end
 
function XEModelComponent GetEmbedMaterialInsName (szSourceSkin, szSourceMaterialInsName) end
 
function XEModelComponent ClearEmbedRecoredSkin (szSkin, bSource) end
 
function XEModelComponent ClearEmbedRecord (bClearModel) end
 
function XEModelComponent GetModelInstance () end
 
function XEModelComponent GetDressUp () end
 
function XEModelComponent GetAssetPath () end
 
function XEModelComponent GetXESkeletonInstance () end
 
function XEModelComponent GetMontageInstance () end
 
function XEModelComponent GetBlendInstance () end
 
function XEModelComponent GetMounterInstance () end
 
function XEModelComponent ReplaceDressup (pAssetPath) end
 
function XEModelComponent CombineMeshesWithSameMaterialIns (pMeshArray) end
 
function XEModelComponent CancelCombineMeshes () end
 
function XEModelComponent AttachMounterAsset (pAssetPath, bReloadAsset) end
 
function XEModelComponent AttachMontageInstance (pMontageIns) end
 
function XEModelComponent DetachMontageInstance () end
 
function XEModelComponent AttachMounterInstance (pMounterIns) end
 
function XEModelComponent DetachMounterInstance () end
 
function XEModelComponent AttachBlendInstance (pBlendIns) end
 
function XEModelComponent DetachBlendInstance () end
 
function XEModelComponent LoadSoftSkeleton (szAssetPath) end
 
function XEModelComponent BuildSoftSkeleton () end
 
function XEModelComponent DestroySoftSkeleton () end
 
function XEModelComponent GetSoftSkeleton () end
 
function XEModelComponent CreateSubviewAgent () end
 
function XEModelComponent BindSubview (pSubviewName, bCreatSubviewIfNotExist, bCreateCameraForSubview) end
 
function XEModelComponent UnBindSubview (bRemoveSubview, pSubviewName) end
 
function XEModelComponent PutCurrentMontageToSubview (pSubviewName, pMontageInstance) end
 
function XEModelComponent PutCurrentMounterToSubview (pSubviewName) end
 
function XEModelComponent SetModelInsMaterial (strSkinName, nLodId, strMeshName, strMaterialFile) end
 
function XEModelComponent GetMaterialIns (nSkinID, nLodID, nMeshID) end
 
function XEModelComponent GetMaterialIns (strSkinName, nLodID, strMeshName) end
 

变量

 XEModelInsSubviewPrimitive = {}
 
 XEModelComponent = {}
 

函数说明

◆ AddAllClothToSceneWithModel()

function XEModelComponent AddAllClothToSceneWithModel ( pWorld  )

将模型实例所绑定的所有布料资源添加到物理 scene,只有将布料资源添加到物理 scene 才能被物理世界更新和渲染

参数
pWorldXEWorld 当前组件所处的世界指针
返回
void

◆ AssignAnimPlayList()

function XEModelComponent AssignAnimPlayList ( )

如果动画播放列表不存在,创建一个

返回
XEAnimComponentPlayList 动画播放列表指针

◆ AttachBlendInstance()

function XEModelComponent AttachBlendInstance ( pBlendIns  )

将当前组件的融合动画实例指向pBlendIns,引用+1

参数
pBlendInsXEAnimBlendInstance 外部已经创建好的融合动画实例
返回
void

◆ AttachMontageInstance()

function XEModelComponent AttachMontageInstance ( pMontageIns  )

将当前组件的蒙太奇动画实例指向pMontageIns,引用+1

参数
pMontageInsXEAnimMontageInstance 外部已经创建好的蒙太奇动画实例
返回
void

◆ AttachMounterAsset()

function XEModelComponent AttachMounterAsset ( pAssetPath  ,
bReloadAsset   
)

加载挂点资源并创建对应的挂点实例

参数
pAssetPathstring 挂点资源路径
bReloadAssetboolean 是否重新加载
返回
boolean 是否挂载成功

◆ AttachMounterInstance()

function XEModelComponent AttachMounterInstance ( pMounterIns  )

将当前组件的挂点实例指向pMounterIns,引用+1

参数
pMounterInsXEAnimSocketMounterInstance 外部已经创建好的挂点实例
返回
void

◆ BindSubview()

function XEModelComponent BindSubview ( pSubviewName  ,
bCreatSubviewIfNotExist  ,
bCreateCameraForSubview   
)

作为持有体绑定到子视图, 当前组件世界必须存在

参数
pSubviewNamestring 渲染的子视图名称
bCreatSubviewIfNotExistboolean 如果子视图不存在,则指定是否自动创建一个
bCreateCameraForSubviewboolean 是否为subview创建一个内部相机对象,并使用该相机,以当前视口中相机参数进行创建,如果要修改相机参数,请获取该视口相机并进行修改
返回
boolean 是否成功

◆ BuildSkeletonInstance()

function XEModelComponent BuildSkeletonInstance ( )

创建骨骼实例

返回
boolean 是否创建成功

◆ BuildSoftSkeleton()

function XEModelComponent BuildSoftSkeleton ( )

创建软骨

返回
boolean 是否创建成功

◆ CancelCombineMeshes()

function XEModelComponent CancelCombineMeshes ( )

XEModelComponent_CancelCombineMeshes00

返回
void

◆ ClearEmbedRecord()

function XEModelComponent ClearEmbedRecord ( bClearModel  )

清除全部嵌入材质信息

参数
bClearModelboolean 是否清除嵌入模型模板
返回
boolean

◆ ClearEmbedRecoredSkin()

function XEModelComponent ClearEmbedRecoredSkin ( szSkin  ,
bSource   
)

清除名为szskin的嵌入skin

参数
szSkinstring
bSourceboolean
返回
boolean

◆ CombineMeshesWithSameMaterialIns()

function XEModelComponent CombineMeshesWithSameMaterialIns ( pMeshArray  )

@manual 合并材质实例相同的mesh,以减少绘制批次 XEModelComponent_CombineMeshesWithSameMaterialIns_manual

参数
pMeshArrayXArray<MeshToBeCombined>
返回
boolean 是否合并成功

◆ CreateClothAttachModel()

function XEModelComponent CreateClothAttachModel ( szClothPath  ,
pWorld  ,
nSkinIndex   
)

根据蒙皮索引和 cth 路径创建布料资源并绑定到模型上,内部是根据材质名进行匹配

参数
szClothPathstring 布料资源(cth)的路径,此路径是相对工程文件夹下.xscene文件的路径
pWorldXEWorld 当前组件所处的世界对象
nSkinIndexnumber 模型对象的蒙皮索引
返回
boolean 布料是否创建成功

◆ CreateClothAttachModelByPath()

function XEModelComponent CreateClothAttachModelByPath ( szClothPath  ,
pWorld  ,
nSkinIndex   
)

同CreateClothAttachModel

参数
szClothPathstring
pWorldXEWorld
nSkinIndexnumber
返回
IXCloth 返回创建的布料指针

◆ CreateSubviewAgent()

function XEModelComponent CreateSubviewAgent ( )

创建Subview代理,如果已经存在,则返回该代理

返回
XESubviewAgent

◆ DestroySkeletonInstance()

function XEModelComponent DestroySkeletonInstance ( )

销毁骨骼实例

返回
boolean 如果销毁返回xtrue,如果原本骨骼实例为空,返回xfalse

◆ DestroySoftSkeleton()

function XEModelComponent DestroySoftSkeleton ( )

销毁软骨

返回
void

◆ DetachBlendInstance()

function XEModelComponent DetachBlendInstance ( )

当前组件绑定的融合动画实例引用-1

返回
void
注意
当引用为0时,解除当前组件绑定的融合动画实例,即释放或置空挂点实例指针对象

◆ DetachMontageInstance()

function XEModelComponent DetachMontageInstance ( )

当前组件绑定的蒙太奇动画实例引用-1

返回
void
注意
当引用为0时,解除当前组件绑定的蒙太奇动画实例,即释放或置空蒙太奇动画指针对象

◆ DetachMounterInstance()

function XEModelComponent DetachMounterInstance ( )

当前组件绑定的挂点实例引用-1

返回
void
注意
当引用为0时,解除当前组件绑定的挂点实例,即释放或置空挂点实例指针对象

◆ EmbedCurrentModel()

function XEModelComponent EmbedCurrentModel ( )

由SourceModel,创建新的模型模板

返回
boolean

◆ EmbedCutModelSkin()

function XEModelComponent EmbedCutModelSkin ( szSkin  ,
pEmbedSkinName   
)

由szSkin,创建新的蒙皮

参数
szSkinstring 源skin名字
pEmbedSkinNamestring 新蒙皮名字
返回
boolean

◆ EmbedMeshMaterialIns()

function XEModelComponent EmbedMeshMaterialIns ( szSkin  ,
szRawMeshName  ,
nLod  ,
pEmbedMatInsName   
)

为skin中指定的rawmesh,创建新的材质实例

参数
szSkinstring 指定的skin
szRawMeshNamestring 指定的RawMesh名称
nLodnumber 指定的Lod
pEmbedMatInsNamestring [out]创建的材质实例名称
返回
boolean

◆ GetAnimController()

function XEModelComponent GetAnimController ( )

获取动画控制器

返回
XEAnimController 动画控制器
注意
could be montage animation controller or model-animation controller.

◆ GetAnimPlayList()

function XEModelComponent GetAnimPlayList ( )

获取动画播放列表

返回
XEAnimComponentPlayList 动画播放列表指针

◆ GetAssetPath()

function XEModelComponent GetAssetPath ( )

获取当前组件中记录的模型实例的资源路径(mdl)的路径

返回
string 模型实例的资源路径(mdl)的路径

◆ GetBlendInstance()

function XEModelComponent GetBlendInstance ( )

获取当前组件中记录的融合动画实例(blend)

返回
XEAnimBlendInstance 融合动画实例指针

◆ GetClothPrimitive() [1/2]

function XEModelComponent GetClothPrimitive ( )

获取模型实例所绑定的所有布料资源

返回
IXCloth[]
void

◆ GetClothPrimitive() [2/2]

function XEModelComponent GetClothPrimitive ( szMeshName  )

获取模型指定的 mesh 上绑定布料资源对应的指针

参数
szMeshNamestring 模型上mesh名称
返回
IXCloth

◆ GetCurPlayAnimation()

function XEModelComponent GetCurPlayAnimation ( )

获取当前播放的动画资源路径

返回
string 当前播放的动画资源路径

◆ GetDressUp()

function XEModelComponent GetDressUp ( )

获取当前组件中记录的换装实例

返回
IXEDressup 换装实例指针

◆ GetEmbedMaterialInsName()

function XEModelComponent GetEmbedMaterialInsName ( szSourceSkin  ,
szSourceMaterialInsName   
)

由源skin和源材质实例name,获取新的材质实例name

参数
szSourceSkinstring 旧skin名称
szSourceMaterialInsNamestring 旧材质实例名字
返回
string 新的材质实例名字

◆ GetEmbedSkinName()

function XEModelComponent GetEmbedSkinName ( szSourceSkin  )

由源skin name获取新的 skin name

参数
szSourceSkinstring 旧skin名称
返回
string

◆ GetMaterialIns() [1/2]

function XEModelComponent GetMaterialIns ( nSkinID  ,
nLodID  ,
nMeshID   
)

获取某个材质实例指针

参数
nSkinIDnumber
nLodIDnumber
nMeshIDnumber
返回
IXMaterialInstance

◆ GetMaterialIns() [2/2]

function XEModelComponent GetMaterialIns ( strSkinName  ,
nLodID  ,
strMeshName   
)

XEModelComponent_GetMaterialIns01

参数
strSkinNamestring
nLodIDnumber
strMeshNamestring
返回
IXMaterialInstance

◆ GetModelInstance()

function XEModelComponent GetModelInstance ( )

获取当前组件中记录的模型实例

返回
IXModelInstance 模型实例指针

◆ GetMontageInstance()

function XEModelComponent GetMontageInstance ( )

获取当前组件中记录的蒙太奇实例

返回
XEAnimMontageInstance 蒙太奇实例指针

◆ GetMounterInstance()

function XEModelComponent GetMounterInstance ( )

获取当前组件中记录的挂点实例

返回
XEAnimSocketMounterInstance 挂点实例指针

◆ GetSoftSkeleton()

function XEModelComponent GetSoftSkeleton ( )

销毁软骨

返回
XESoftSkeleton 软骨

◆ GetVertexPositionFromUV()

function XEModelComponent GetVertexPositionFromUV ( szMeshName  ,
szSkinName  ,
uv   
)

由UV获取顶点位置信息

参数
szMeshNamestring [in]mesh名称
szSkinNamestring [in]蒙皮名称
uvXVECTOR2 [in]uv信息
返回
XVECTOR3
boolean 是否获取成功

◆ GetXESkeletonInstance()

function XEModelComponent GetXESkeletonInstance ( )

获取当前组件中记录的骨骼实例

返回
XESkeletonInstance 骨骼实例指针

◆ GetXModelFromAsset()

function XEModelComponent GetXModelFromAsset ( pAssetPath  )

获取模型指针

参数
pAssetPathstring 模型路径(全路径),取到后引用+1
返回
XModel 模型指针

◆ LoadAssetAsync()

function XEModelComponent LoadAssetAsync ( pPath  ,
Delegate   
)

@manual xelua_XEngine_XEModelComponent_LoadAssetAsync_manual XEModelComponent_LoadAssetAsync_manual

参数
pPathstring
Delegatestd::function<void( _cstring , XEActorComponent*, ResultType)>
返回
void

◆ LoadSoftSkeleton()

function XEModelComponent LoadSoftSkeleton ( szAssetPath  )

加载软骨文件

参数
szAssetPathstring 软骨文件路径
返回
number errorcode错误码

◆ PutCurrentMontageToSubview()

function XEModelComponent PutCurrentMontageToSubview ( pSubviewName  ,
pMontageInstance   
)

关联Montage相关到subview

参数
pSubviewNamestring
pMontageInstanceXEAnimMontageInstance
返回
void

◆ PutCurrentMounterToSubview()

function XEModelComponent PutCurrentMounterToSubview ( pSubviewName  )

关联Mounter相关到subview

参数
pSubviewNamestring
返回
void

◆ RemoveAndReleaseClothAssetFromMesh()

function XEModelComponent RemoveAndReleaseClothAssetFromMesh ( szMeshName  )

从模型指定的 mesh 上移除布料并释放

参数
szMeshNamestring 模型上mesh名称
返回
void

◆ RemoveCloth()

function XEModelComponent RemoveCloth ( pCloth  )

移除指定布料

参数
pClothIXCloth 要移除的布料指针
返回
void

◆ ReplaceDressup()

function XEModelComponent ReplaceDressup ( pAssetPath  )

替换模型的dressup, 并不会对骨架、动画控制器等产生影响

参数
pAssetPathstring dressup资源路径
返回
boolean 是否替换成功,该dressup的模型骨架必须与当前一致,否则替换不成功

◆ SetModelInsMaterial()

function XEModelComponent SetModelInsMaterial ( strSkinName  ,
nLodId  ,
strMeshName  ,
strMaterialFile   
)

给ModelIns设置材质

参数
strSkinNamestring
nLodIdnumber
strMeshNamestring
strMaterialFilestring
返回
boolean

◆ SetSkeletonInstance()

function XEModelComponent SetSkeletonInstance ( pSkeleIns  )

设置骨骼实例

参数
pSkeleInsXESkeletonInstance 骨骼实例指针
返回
void

◆ UnBindSubview()

function XEModelComponent UnBindSubview ( bRemoveSubview  ,
pSubviewName   
)

从子视图中解除绑定

参数
bRemoveSubviewboolean 是否在解除绑定后删除子视图
pSubviewNamestring 指定子视图名称,如果为空,则解绑关联的所有子视图
返回
boolean 是否成功

变量说明

◆ XEModelComponent

◆ XEModelInsSubviewPrimitive