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

Functions

function XClothStretchConfig new () end
 
function IXCloth Release () end
 
function IXCloth GetName () end
 
function IXCloth IsRender () end
 
function IXCloth SetRender (bSet) end
 
function IXCloth IsSimulate () end
 
function IXCloth SetSimulate (bSet) end
 
function IXCloth GetClothMaterial () end
 
function IXCloth SetClothMaterial (Material) end
 
function IXCloth GetStiffnessFrequency () end
 
function IXCloth SetStiffnessFrequency (fStiffnessFrequency) end
 
function IXCloth GetStretchConfig (eType) end
 
function IXCloth SetStretchConfig (eType, param) end
 
function IXCloth GetTetherConfig () end
 
function IXCloth SetTetherConfig (config) end
 
function IXCloth GetDamping () end
 
function IXCloth SetDamping (fDamping) end
 
function IXCloth GetDrag () end
 
function IXCloth SetDrag (fDrag) end
 
function IXCloth GetFriction () end
 
function IXCloth SetFriction (fFriction) end
 
function IXCloth GetMassScale () end
 
function IXCloth SetMassScale (fMassScale) end
 
function IXCloth GetSolverFrequency () end
 
function IXCloth SetSolverFrequency (fSolverFrequency) end
 
function IXCloth GetInertiaScale () end
 
function IXCloth SetInertiaScale (fInertiaScale) end
 
function IXCloth GetSelfCollisionThickness () end
 
function IXCloth SetSelfCollisionThickness (fSelfCollisionThickness) end
 
function IXCloth GetSelfCollisionStiffness () end
 
function IXCloth SetSelfCollisionStiffness (fSelfCollisionStiffness) end
 
function IXCloth GetExtraScale () end
 
function IXCloth SetExtraScale (fExtraScale) end
 
function IXCloth SetRenderCollision (bRender) end
 
function IXCloth SetRenderCollision (bRender, clr) end
 
function IXCloth SetRenderNormal (bRender) end
 
function IXCloth SetRenderNormal (bRender, clr) end
 
function IXCloth SetRenderTangent (bRender) end
 
function IXCloth SetRenderTangent (bRender, clr) end
 
function IXCloth SetRenderMaxDistance (bRender) end
 
function IXCloth SetRenderMaxDistance (bRender, clr) end
 

Variables

 XCST_INVALID = 0
 
 XCST_VERTICAL = 0
 
 XCST_HORIZONTAL = 0
 
 XCST_BENDING = 0
 
 XCST_SHEARING = 0
 
 XClothStretchConfig = {}
 

Function Documentation

◆ GetClothMaterial()

function IXCloth GetClothMaterial ( )

获取布料材质信息

Returns
XClothMaterial 布料材质信息

◆ GetDamping()

function IXCloth GetDamping ( )

获取阻尼系数,用来降低布料顶点之间的相对速度。此值越大,布料看起来就越“粘稠”。

Returns
number 阻尼系数

◆ GetDrag()

function IXCloth GetDrag ( )

获取三个轴的阻力系数

Returns
number 三个轴的阻力系数

◆ GetExtraScale()

function IXCloth GetExtraScale ( )

IXCloth_GetExtraScale00

Returns
number

◆ GetFriction()

function IXCloth GetFriction ( )

获取碰撞表面的摩擦系数

Returns
number 碰撞表面的摩擦系数

◆ GetInertiaScale()

function IXCloth GetInertiaScale ( )

获取惯性缩放因子

Returns
number 惯性缩放因子

◆ GetMassScale()

function IXCloth GetMassScale ( )

获取刚体质量缩放系数

Returns
number 刚体质量缩放系数

◆ GetName()

function IXCloth GetName ( )

获取布料名称

Returns
string

◆ GetSelfCollisionStiffness()

function IXCloth GetSelfCollisionStiffness ( )

获取自碰撞的刚度,定义粒子碰撞时分离冲量的强度。

Returns
number 自碰撞的刚度

◆ GetSelfCollisionThickness()

function IXCloth GetSelfCollisionThickness ( )

获取自碰撞的距离,模拟布料的厚度。自身碰撞可以在布料的任意顶点之间进行碰撞测试, 每个顶点以半径为SelfCollisionThickness的球体表示。此值越大,减少了布料自缠绕的问题,同时也会阻止布料起皱。

Returns
number 自碰撞的距离

◆ GetSolverFrequency()

function IXCloth GetSolverFrequency ( )

获取解码器频率。即每秒模拟计算的频率。此值越小,布料越有弹性。

Returns
number 解码器频率

◆ GetStiffnessFrequency()

function IXCloth GetStiffnessFrequency ( )

获取刚体频率(不建议布料绑定后更改此参数)

Returns
number 刚体频率

◆ GetStretchConfig()

function IXCloth GetStretchConfig ( eType  )

获取拉伸力的约束数据

Parameters
eTypenumber 拉伸类型
Returns
XClothStretchConfig 拉伸力的约束数据

◆ GetTetherConfig()

function IXCloth GetTetherConfig ( )

获取绳索约束数据

Returns
XClothTetherConfig 绳索约束数据

◆ IsRender()

function IXCloth IsRender ( )

判断是否渲染

Returns
boolean 是否渲染

◆ IsSimulate()

function IXCloth IsSimulate ( )

判断是否开启了模拟

Returns
boolean 是否开启了模拟

◆ new()

function XClothStretchConfig new ( )

XClothStretchConfig_new00

Returns
XClothStretchConfig

XClothTetherConfig_new00

Returns
XClothTetherConfig

◆ Release()

function IXCloth Release ( )

释放

Returns
void

◆ SetClothMaterial()

function IXCloth SetClothMaterial ( Material  )

设置布料材质信息

Parameters
MaterialXClothMaterial 布料材质信息
Returns
void

◆ SetDamping()

function IXCloth SetDamping ( fDamping  )

设置阻尼系数,用来降低布料顶点之间的相对速度。此值越大,布料看起来就越“粘稠”。

Parameters
fDampingnumber 阻尼系数
Returns
void

◆ SetDrag()

function IXCloth SetDrag ( fDrag  )

设置三个轴的阻力系数

Parameters
fDragnumber 三个轴的阻力系数
Returns
void

◆ SetExtraScale()

function IXCloth SetExtraScale ( fExtraScale  )

IXCloth_SetExtraScale00

Parameters
fExtraScalenumber
Returns
void

◆ SetFriction()

function IXCloth SetFriction ( fFriction  )

设置碰撞表面的摩擦系数

Parameters
fFrictionnumber 碰撞表面的摩擦系数
Returns
void

◆ SetInertiaScale()

function IXCloth SetInertiaScale ( fInertiaScale  )

设置惯性缩放因子

Parameters
fInertiaScalenumber 惯性缩放因子
Returns
void

◆ SetMassScale()

function IXCloth SetMassScale ( fMassScale  )

设置刚体质量缩放系数

Parameters
fMassScalenumber 刚体质量缩放系数
Returns
void

◆ SetRender()

function IXCloth SetRender ( bSet  )

设置是否渲染

Parameters
bSetboolean 是否渲染
Returns
void

◆ SetRenderCollision() [1/2]

function IXCloth SetRenderCollision ( bRender  )

设置渲染碰撞信息

Parameters
bRenderboolean 是否渲染
Returns
void

◆ SetRenderCollision() [2/2]

function IXCloth SetRenderCollision ( bRender  ,
clr   
)

IXCloth_SetRenderCollision01

Parameters
bRenderboolean
clrXCOLORBASE
Returns
void

◆ SetRenderMaxDistance() [1/2]

function IXCloth SetRenderMaxDistance ( bRender  )

设置渲染最大距离

Parameters
bRenderboolean 是否渲染
Returns
void

◆ SetRenderMaxDistance() [2/2]

function IXCloth SetRenderMaxDistance ( bRender  ,
clr   
)

IXCloth_SetRenderMaxDistance01

Parameters
bRenderboolean
clrXCOLORBASE
Returns
void

◆ SetRenderNormal() [1/2]

function IXCloth SetRenderNormal ( bRender  )

设置渲染法线

Parameters
bRenderboolean 是否渲染
Returns
void

◆ SetRenderNormal() [2/2]

function IXCloth SetRenderNormal ( bRender  ,
clr   
)

IXCloth_SetRenderNormal01

Parameters
bRenderboolean
clrXCOLORBASE
Returns
void

◆ SetRenderTangent() [1/2]

function IXCloth SetRenderTangent ( bRender  )

设置渲染切线

Parameters
bRenderboolean 是否渲染
Returns
void

◆ SetRenderTangent() [2/2]

function IXCloth SetRenderTangent ( bRender  ,
clr   
)

IXCloth_SetRenderTangent01

Parameters
bRenderboolean
clrXCOLORBASE
Returns
void

◆ SetSelfCollisionStiffness()

function IXCloth SetSelfCollisionStiffness ( fSelfCollisionStiffness  )

设置自碰撞的刚度,定义粒子碰撞时分离冲量的强度。

Parameters
fSelfCollisionStiffnessnumber 自碰撞的刚度
Returns
void

◆ SetSelfCollisionThickness()

function IXCloth SetSelfCollisionThickness ( fSelfCollisionThickness  )

设置自碰撞的距离,模拟布料的厚度。自身碰撞可以在布料的任意顶点之间进行碰撞测试, 每个顶点以半径为SelfCollisionThickness的球体表示。此值越大,减少了布料自缠绕的问题,同时也会阻止布料起皱。

Parameters
fSelfCollisionThicknessnumber 自碰撞的距离
Returns
void

◆ SetSimulate()

function IXCloth SetSimulate ( bSet  )

设置是否开启模拟

Parameters
bSetboolean 是否开启模拟
Returns
void

◆ SetSolverFrequency()

function IXCloth SetSolverFrequency ( fSolverFrequency  )

设置解码器频率。即每秒模拟计算的频率。此值越小,布料越有弹性。

Parameters
fSolverFrequencynumber 解码器频率
Returns
void

◆ SetStiffnessFrequency()

function IXCloth SetStiffnessFrequency ( fStiffnessFrequency  )

设置刚体频率(不建议布料绑定后更改此参数)

Parameters
fStiffnessFrequencynumber 刚体频率
Returns
void

◆ SetStretchConfig()

function IXCloth SetStretchConfig ( eType  ,
param   
)

设置拉伸力的约束数据

Parameters
eTypenumber 拉伸类型
paramXClothStretchConfig 拉伸力的约束数据
Returns
void

◆ SetTetherConfig()

function IXCloth SetTetherConfig ( config  )

设置绳索约束数据

Parameters
configXClothTetherConfig 绳索约束数据
Returns
void

Variable Documentation

◆ XClothStretchConfig

◆ XCST_BENDING

XCST_BENDING = 0

◆ XCST_HORIZONTAL

XCST_HORIZONTAL = 0

◆ XCST_INVALID

XCST_INVALID = 0

◆ XCST_SHEARING

XCST_SHEARING = 0

◆ XCST_VERTICAL

XCST_VERTICAL = 0