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

#include <PhysicalManager.h>

类 IXPhysicalManager 继承关系图:
Inheritance graph

#include <PhysicalManager.h>

类 IXPhysicsStatGroup 继承关系图:
Inheritance graph

函数

function IXPhysicalManager CreateScene (szSceneName) end
 
function IXPhysicalManager GetCloth (pInstance, szMeshName) end
 
function IXPhysicalManager GetCloth (pInstance) 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 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
 

变量

 IXPhysicalManager = {}
 

函数说明

◆ AddCloth() [1/2]

function IXPhysicalManager AddCloth ( pInstance  ,
nSkinIndex  ,
pCloth   
)

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

参数
pInstanceIXModelInstance 模型实例指针
nSkinIndexnumber
pClothIXCloth 布料实例指针
返回
boolean

◆ AddCloth() [2/2]

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

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

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

◆ CreateCloth()

function IXPhysicalManager CreateCloth ( szPath  )

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

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

◆ CreateRigidBody()

function IXPhysicalManager CreateRigidBody ( eType  ,
pBindObject   
)

创建一个刚体

参数
eTypenumber 刚体类型
pBindObjectXBaseCoordSpace 一个BaseCoordSpace类,当前有模型和特效
返回
IXRigidBody

◆ CreateScene()

function IXPhysicalManager CreateScene ( szSceneName  )

创建一个物理场景

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

◆ CreateSkeletalPhysicsInstance()

function IXPhysicalManager CreateSkeletalPhysicsInstance ( szSkeletalPhysicsRes  ,
pModelInstance  ,
pOwningScene   
)

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

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

◆ GetCloth() [1/2]

function IXPhysicalManager GetCloth ( pInstance  )

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

参数
pInstanceIXModelInstance 模型实例的指针
返回
IXCloth[]
void

◆ GetCloth() [2/2]

function IXPhysicalManager GetCloth ( pInstance  ,
szMeshName   
)

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

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

◆ GetMeshNameWithCloth()

function IXPhysicalManager GetMeshNameWithCloth ( pInstance  )

获取所有带布料的mesh名称

参数
pInstanceIXModelInstance 模型实例的指针
返回
string[]
void

◆ GetWindDir()

function IXPhysicalManager GetWindDir ( )

获取全局风向

返回
XVECTOR3

◆ GetWindSpeed()

function IXPhysicalManager GetWindSpeed ( )

获取全局风速

返回
number

◆ LoadPhysicsRes()

function IXPhysicalManager LoadPhysicsRes ( sz  ,
bReload   
)

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

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

◆ RemoveCloth() [1/2]

function IXPhysicalManager RemoveCloth ( pInstance  )

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

参数
pInstanceIXModelInstance 模型实例指针
返回
void

◆ RemoveCloth() [2/2]

function IXPhysicalManager RemoveCloth ( pInstance  ,
szMeshName   
)

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

参数
pInstanceIXModelInstance 模型实例指针
szMeshNamestring 模型mesh名称
返回
void

◆ SetClothInfoToSkin()

function IXPhysicalManager SetClothInfoToSkin ( pInstance  )

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

参数
pInstanceIXModelInstance 模型实例指针
返回
void

◆ SetWindDir()

function IXPhysicalManager SetWindDir ( vDir  )

设置全局风向

参数
vDirXVECTOR3
返回
void

◆ SetWindSpeed()

function IXPhysicalManager SetWindSpeed ( fWindSpeed  )

设置全局风速

参数
fWindSpeednumber
返回
void

变量说明

◆ IXPhysicalManager