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

函数

function XHitMeshInfo new () end
 
function XOutputVertexTransform new (otherPosition, otherTangentZ, otherTangentX) end
 
function IXModelInstance Release () end
 
function IXModelInstance RayTraceToAABB (vStart, vDelta) end
 
function IXModelInstance RayTraceToMesh (vStart, vDelta, bForceTwoSided) end
 
function IXModelInstance Hide (bHide) end
 
function IXModelInstance IsHidden () end
 
function IXModelInstance SetMeshHide (szMeshName, bHide) end
 
function IXModelInstance IsMeshHide (szMeshName) end
 
function IXModelInstance GetSkinModel () end
 
function IXModelInstance GetSkeleton () end
 
function IXModelInstance GetBoneOBB () end
 
function IXModelInstance GetSkinModelType () end
 
function IXModelInstance GetBoneAABB (szBoneName) end
 
function IXModelInstance UpdateSkinInfoAndMeshInfo () end
 
function IXModelInstance ChangeSkeleton () end
 
function IXModelInstance UpdateBlendMatrix (bClearPreMatrix) end
 
function IXModelInstance GetBlendMatrix (nSkinIndex, nLODIndex, nMeshIndex) end
 
function IXModelInstance UpdateBlendMatrixAndAABB () end
 
function IXModelInstance SetSkinCurrentLOD (szSkinName, nLODIndex) end
 
function IXModelInstance SetSkinCurrentLOD (nSkinIndex, nLODIndex) end
 
function IXModelInstance Tick (nDeltaTime, bClearPreMatrix) end
 
function IXModelInstance SetMeshAsCloth (szMeshName, bIsCloth) end
 
function IXModelInstance TickAABB () end
 
function IXModelInstance SetRawMeshMtlIns (szSkinName, szMeshName, szMtlIns, nLODIndex) end
 
function IXModelInstance GetRawMeshMtlIns (szSkinName, szMeshName, nLODIndex) end
 

变量

 XHitMeshInfo = {}
 
XHitMeshInfo strHitBoneName = ''
 @type string
 
XHitMeshInfo strHitSkinName = ''
 @type string
 
XHitMeshInfo strHitMeshName = ''
 @type string
 
XHitMeshInfo pMeshMtlIns = {}
 @type IXMaterialInstance
 

函数说明

◆ ChangeSkeleton()

function IXModelInstance ChangeSkeleton ( )

更换模型实例的骨架

返回
void

◆ GetBlendMatrix()

function IXModelInstance GetBlendMatrix ( nSkinIndex  ,
nLODIndex  ,
nMeshIndex   
)

获取模型实例指定Mesh的骨架矩阵信息

参数
nSkinIndexnumber Skin索引
nLODIndexnumber LOD索引
nMeshIndexnumber Mesh索引
返回
XVECTOR4[] 骨架矩阵(类型XArray<XVECTOR4>)

◆ GetBoneAABB()

function IXModelInstance GetBoneAABB ( szBoneName  )

IXModelInstance_GetBoneAABB00

参数
szBoneNamestring
返回
XCusAABB
boolean

◆ GetBoneOBB()

function IXModelInstance GetBoneOBB ( )

IXModelInstance_GetBoneOBB00

返回
XCusOBB[]
void

◆ GetRawMeshMtlIns()

function IXModelInstance GetRawMeshMtlIns ( szSkinName  ,
szMeshName  ,
nLODIndex   
)

IXModelInstance_GetRawMeshMtlIns00

参数
szSkinNamestring
szMeshNamestring
nLODIndexnumber
返回
IXMaterialInstance

◆ GetSkeleton()

function IXModelInstance GetSkeleton ( )

获取模型骨架对象

返回
XSkeleton 模型骨架对象

◆ GetSkinModel()

function IXModelInstance GetSkinModel ( )

获取模型模板

返回
XModel 模型模板

◆ GetSkinModelType()

function IXModelInstance GetSkinModelType ( )

获取模型对应的类型

返回
number 模型对应的类型

◆ Hide()

function IXModelInstance Hide ( bHide  )

设置是否隐藏模型

参数
bHideboolean 是否隐藏模型
返回
void

◆ IsHidden()

function IXModelInstance IsHidden ( )

判断模型是否隐藏

返回
boolean 模型是否隐藏,如果是隐藏状态,返回xtrue.

◆ IsMeshHide()

function IXModelInstance IsMeshHide ( szMeshName  )

某个特定名称的mesh是否显示,不区分Skin

参数
szMeshNamestring
返回
boolean mesh是否隐藏

◆ new() [1/2]

function XHitMeshInfo new ( )

XHitMeshInfo_new00

返回
XHitMeshInfo

XRAYTRACERT_new00

返回
XRAYTRACERT

XOutputVertexTransform_new00

返回
XOutputVertexTransform

MeshToBeCombined_new00

返回
MeshToBeCombined

IXModelInstance_new00

返回
IXModelInstance

◆ new() [2/2]

function XOutputVertexTransform new ( otherPosition  ,
otherTangentZ  ,
otherTangentX   
)

XOutputVertexTransform_new01

参数
otherPositionXVECTOR3
otherTangentZXVECTOR3
otherTangentXXVECTOR3
返回
XOutputVertexTransform

◆ RayTraceToAABB()

function IXModelInstance RayTraceToAABB ( vStart  ,
vDelta   
)

IXModelInstance_RayTraceToAABB00

参数
vStartXVECTOR3
vDeltaXVECTOR3
返回
number
boolean

◆ RayTraceToMesh()

function IXModelInstance RayTraceToMesh ( vStart  ,
vDelta  ,
bForceTwoSided   
)

IXModelInstance_RayTraceToMesh00

参数
vStartXVECTOR3
vDeltaXVECTOR3
bForceTwoSidedboolean
返回
XRAYTRACERT
boolean

◆ Release()

function IXModelInstance Release ( )

释放模型实例资源

返回
void

◆ SetMeshAsCloth()

function IXModelInstance SetMeshAsCloth ( szMeshName  ,
bIsCloth   
)

设置指定Mesh为布料Mesh

参数
szMeshNamestring 指定Mesh名称
bIsClothboolean 是否为布料Mesh
返回
void

◆ SetMeshHide()

function IXModelInstance SetMeshHide ( szMeshName  ,
bHide   
)

设置某个特定名称的mesh隐藏或显示,不区分Skin

参数
szMeshNamestring
bHideboolean 是否隐藏模型
返回
void

◆ SetRawMeshMtlIns()

function IXModelInstance SetRawMeshMtlIns ( szSkinName  ,
szMeshName  ,
szMtlIns  ,
nLODIndex   
)

IXModelInstance_SetRawMeshMtlIns00

参数
szSkinNamestring
szMeshNamestring
szMtlInsstring
nLODIndexnumber
返回
void

◆ SetSkinCurrentLOD() [1/2]

function IXModelInstance SetSkinCurrentLOD ( nSkinIndex  ,
nLODIndex   
)

IXModelInstance_SetSkinCurrentLOD01

参数
nSkinIndexnumber
nLODIndexnumber
返回
void

◆ SetSkinCurrentLOD() [2/2]

function IXModelInstance SetSkinCurrentLOD ( szSkinName  ,
nLODIndex   
)

设置模型指定Skin使用的当前LOD

参数
szSkinNamestring ornSkinIndexSkin名称或Skin索引
nLODIndexnumber LOD索引,设置为-1表示自动LOD
返回
void

◆ Tick()

function IXModelInstance Tick ( nDeltaTime  ,
bClearPreMatrix   
)

更新当前模型实例

参数
nDeltaTimenumber 更新间隔
bClearPreMatrixboolean 是否清除之前的矩阵信息
返回
void

◆ TickAABB()

function IXModelInstance TickAABB ( )

更新模型实例的AABB包围盒

返回
void

◆ UpdateBlendMatrix()

function IXModelInstance UpdateBlendMatrix ( bClearPreMatrix  )

更新模型实例的骨架矩阵信息

参数
bClearPreMatrixboolean 是否清除上一帧的矩阵信息
返回
void

◆ UpdateBlendMatrixAndAABB()

function IXModelInstance UpdateBlendMatrixAndAABB ( )

更新模型实例的融合矩阵和AABB包围盒

返回
void

◆ UpdateSkinInfoAndMeshInfo()

function IXModelInstance UpdateSkinInfoAndMeshInfo ( )

更新模型实例的Skin信息和Mesh信息

返回
void

变量说明

◆ pMeshMtlIns

XHitMeshInfo pMeshMtlIns = {}

◆ strHitBoneName

XHitMeshInfo strHitBoneName = ''

@type string

◆ strHitMeshName

XHitMeshInfo strHitMeshName = ''

@type string

◆ strHitSkinName

XHitMeshInfo strHitSkinName = ''

@type string

◆ XHitMeshInfo