AR_Engine_SDK
Functions | Variables
PhysicalManager.lua File Reference
类 IXPhysicalManager 继承关系图:
Inheritance graph
类 IXPhysicsStatGroup 继承关系图:
Inheritance graph

Functions

function IXPhysicalManager Init () end
 
function IXPhysicalManager Release () end
 
function IXPhysicalManager CreateScene (szSceneName) end
 
function IXPhysicalManager GetCloth (pInstance, szMeshName) end
 
function IXPhysicalManager GetCloth (pInstance, aCloth) end
 
function IXPhysicalManager GetCloth (pInstance) end
 
function IXPhysicalManager GetMeshNameWithCloth (pInstance, aMeshName) end
 
function IXPhysicalManager GetMeshNameWithCloth (pInstance) end
 
function IXPhysicalManager CreateCloth (szPath) end
 
function IXPhysicalManager AddCloth (pInstance, nSkinIndex, pCloth) end
 
function IXPhysicalManager RemoveCloth (pInstance) end
 
function IXPhysicalManager AddCloth (pInstance, nSkinIndex, szMeshName, pCloth) end
 
function IXPhysicalManager RemoveCloth (pInstance, szMeshName) end
 
function IXPhysicalManager SetClothInfoToSkin (pInstance) end
 
function IXPhysicalManager SaveCloth (szFile, pCloth) end
 
function IXPhysicalManager CreateRigidBody (eType, pBindObject) end
 
function IXPhysicalManager LoadPhysicsRes (sz, bReload) end
 
function IXPhysicalManager CreateSkeletalPhysicsInstance (szSkeletalPhysicsRes, pModelInstance, pOwningScene) end
 
function IXPhysicalManager SetWindSpeed (fWindSpeed) end
 
function IXPhysicalManager GetWindSpeed () end
 
function IXPhysicalManager SetWindDir (vDir) end
 
function IXPhysicalManager GetWindDir () end
 

Variables

 IXPhysicalManager = {}
 

Function Documentation

◆ AddCloth() [1/2]

function IXPhysicalManager AddCloth ( pInstance  ,
nSkinIndex  ,
pCloth   
)

自动将布料实例与模型绑定,根据材质名进行匹配

Parameters
pInstanceIXModelInstance 模型实例指针
nSkinIndexnumber
pClothIXCloth 布料实例指针
Returns
boolean

◆ AddCloth() [2/2]

function IXPhysicalManager AddCloth ( pInstance  ,
nSkinIndex  ,
szMeshName  ,
pCloth   
)

将布料实例与模型的某个mesh绑定

Parameters
pInstanceIXModelInstance 模型实例指针
nSkinIndexnumber
szMeshNamestring 模型mesh名称
pClothIXCloth 布料实例指针
Returns
boolean 失败情况:mesh已绑定/cloth已绑定/meshName未找到/骨骼名称不匹配等.

◆ CreateCloth()

function IXPhysicalManager CreateCloth ( szPath  )

从硬盘上加载一个布料实例

Parameters
szPathstring 布料的路径
Returns
IXCloth 布料实例的指针,如果失败返回空指针

◆ CreateRigidBody()

function IXPhysicalManager CreateRigidBody ( eType  ,
pBindObject   
)

创建一个刚体

Parameters
eTypenumber 刚体类型
pBindObjectXBaseCoordSpace 一个BaseCoordSpace类,当前有模型和特效
Returns
IXRigidBody

◆ CreateScene()

function IXPhysicalManager CreateScene ( szSceneName  )

创建一个物理场景

Parameters
szSceneNamestring 场景名称
Returns
IXPhysicsScene 场景指针,创建失败返回NULL

◆ CreateSkeletalPhysicsInstance()

function IXPhysicalManager CreateSkeletalPhysicsInstance ( szSkeletalPhysicsRes  ,
pModelInstance  ,
pOwningScene   
)

从骨骼物理资源创建骨骼物理实例

Parameters
szSkeletalPhysicsResstring 骨骼物理资源的路径
pModelInstanceIXModelInstance
pOwningSceneIXPhysicsScene
Returns
IXSkeletalPhysicsInstance 骨骼物理实例的指针,如果失败返回空指针

◆ GetCloth() [1/3]

function IXPhysicalManager GetCloth ( pInstance  ,
szMeshName   
)

从一个模型实例的某个Mesh上获取布料实例

Parameters
pInstanceIXModelInstance 模型实例的指针
szMeshNamestring mesh的名称
Returns
IXCloth 布料实例的指针,如果没有绑定布料返回空指针

◆ GetCloth() [2/3]

function IXPhysicalManager GetCloth ( pInstance  ,
aCloth   
)

从一个模型实例获取所有的布料实例

Parameters
pInstanceIXModelInstance 模型实例的指针
aClothIXCloth[] Cloth数组
Returns
void

◆ GetCloth() [3/3]

function IXPhysicalManager GetCloth ( pInstance  )

IXPhysicalManager_GetCloth02

Parameters
pInstanceIXModelInstance
Returns
IXCloth[]
void

◆ GetMeshNameWithCloth() [1/2]

function IXPhysicalManager GetMeshNameWithCloth ( pInstance  ,
aMeshName   
)

获取所有带布料的mesh名称

Parameters
pInstanceIXModelInstance 模型实例的指针
aMeshNamestring[]
Returns
void

◆ GetMeshNameWithCloth() [2/2]

function IXPhysicalManager GetMeshNameWithCloth ( pInstance  )

IXPhysicalManager_GetMeshNameWithCloth01

Parameters
pInstanceIXModelInstance
Returns
string[]
void

◆ GetWindDir()

function IXPhysicalManager GetWindDir ( )

获取全局风向

Returns
XVECTOR3

◆ GetWindSpeed()

function IXPhysicalManager GetWindSpeed ( )

获取全局风速

Returns
number

◆ Init()

function IXPhysicalManager Init ( )

初始化

Returns
boolean

◆ LoadPhysicsRes()

function IXPhysicalManager LoadPhysicsRes ( sz  ,
bReload   
)

从硬盘上加载一个物理资源(碰撞体)

Parameters
szstring
bReloadboolean 是否重加载
Returns
IXPhysicsRes 物理资源的指针,如果失败返回空指针

◆ Release()

function IXPhysicalManager Release ( )

释放

Returns
void

◆ RemoveCloth() [1/2]

function IXPhysicalManager RemoveCloth ( pInstance  )

移除模型实例某个mesh的所有布料

Parameters
pInstanceIXModelInstance 模型实例指针
Returns
void

◆ RemoveCloth() [2/2]

function IXPhysicalManager RemoveCloth ( pInstance  ,
szMeshName   
)

移除模型实例某个mesh的布料

Parameters
pInstanceIXModelInstance 模型实例指针
szMeshNamestring 模型mesh名称
Returns
void

◆ SaveCloth()

function IXPhysicalManager SaveCloth ( szFile  ,
pCloth   
)

保存布料文件

Parameters
szFilestring
pClothIXCloth
Returns
boolean

◆ SetClothInfoToSkin()

function IXPhysicalManager SetClothInfoToSkin ( pInstance  )

将模型实例当前的布料信息设置到Skin上

Parameters
pInstanceIXModelInstance 模型实例指针
Returns
void

◆ SetWindDir()

function IXPhysicalManager SetWindDir ( vDir  )

设置全局风向

Parameters
vDirXVECTOR3
Returns
void

◆ SetWindSpeed()

function IXPhysicalManager SetWindSpeed ( fWindSpeed  )

设置全局风速

Parameters
fWindSpeednumber
Returns
void

Variable Documentation

◆ IXPhysicalManager