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

Functions

function XHitMeshInfo new () end
 @type boolean More...
 
function XOutputVertexTransform new (otherPosition, otherTangentZ, otherTangentX) end
 
function IXModelInstance Release () end
 
function IXModelInstance RayTraceToAABB (vStart, vDelta, fFraction) end
 
function IXModelInstance RayTraceToAABB (vStart, vDelta) end
 
function IXModelInstance RayTraceToMesh (vStart, vDelta, pOutTraceRt, bForceTwoSided) 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 (aOutObb) end
 
function IXModelInstance GetBoneOBB () end
 
function IXModelInstance GetMeshVertexDef (nSkinIndex, nLODIndex, nMeshIndex, bUseInstancedRender) end
 
function IXModelInstance GetSkinModelType () end
 
function IXModelInstance GetBoneAABB (szBoneName, aabb) 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 Tick (nDeltaTime, bClearPreMatrix) end
 
function IXModelInstance SetMeshAsCloth (szMeshName, bIsCloth) end
 
function IXModelInstance GetBlendShapeInstance () end
 
function IXModelInstance TickAABB () end
 
function IXModelInstance SetRawMeshMtlIns (szSkinName, szMeshName, szMtlIns, nLODIndex) end
 
function IXModelInstance GetRawMeshMtlIns (szSkinName, szMeshName, nLODIndex) end
 
function IXModelInstance SetupSubview (subViewParamDesc) end
 
function IXModelInstance SetSubviewBackgroundFillParam (param) end
 

Variables

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

Function Documentation

◆ ChangeSkeleton()

function IXModelInstance ChangeSkeleton ( )

更换模型实例的骨架

Returns
void

◆ GetBlendMatrix()

function IXModelInstance GetBlendMatrix ( nSkinIndex  ,
nLODIndex  ,
nMeshIndex   
)

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

Parameters
nSkinIndexnumber Skin索引
nLODIndexnumber LOD索引
nMeshIndexnumber Mesh索引
Returns
XVECTOR4[] 骨架矩阵(类型XArray<XVECTOR4>)

◆ GetBlendShapeInstance()

function IXModelInstance GetBlendShapeInstance ( )

获取模型Morph实例对象

Returns
XBlendShapeInstance 模型Morph实例对象

◆ GetBoneAABB() [1/2]

function IXModelInstance GetBoneAABB ( szBoneName  ,
aabb   
)

IXModelInstance_GetBoneAABB00

Parameters
szBoneNamestring
aabbXCusAABB
Returns
boolean

◆ GetBoneAABB() [2/2]

function IXModelInstance GetBoneAABB ( szBoneName  )

IXModelInstance_GetBoneAABB01

Parameters
szBoneNamestring
Returns
XCusAABB
boolean

◆ GetBoneOBB() [1/2]

function IXModelInstance GetBoneOBB ( aOutObb  )

IXModelInstance_GetBoneOBB00

Parameters
aOutObbXCusOBB[]
Returns
void

◆ GetBoneOBB() [2/2]

function IXModelInstance GetBoneOBB ( )

IXModelInstance_GetBoneOBB01

Returns
XCusOBB[]
void

◆ GetMeshVertexDef()

function IXModelInstance GetMeshVertexDef ( nSkinIndex  ,
nLODIndex  ,
nMeshIndex  ,
bUseInstancedRender   
)

获取模型某个Mesh的顶点描述信息

Parameters
nSkinIndexnumber skin索引
nLODIndexnumber LOD索引
nMeshIndexnumber Mesh索引
bUseInstancedRenderboolean 无效参数
Returns
IXVertexDesc 定点数据信息对象

◆ GetRawMeshMtlIns()

function IXModelInstance GetRawMeshMtlIns ( szSkinName  ,
szMeshName  ,
nLODIndex   
)

IXModelInstance_GetRawMeshMtlIns00

Parameters
szSkinNamestring
szMeshNamestring
nLODIndexnumber
Returns
IXMaterialInstance

◆ GetSkeleton()

function IXModelInstance GetSkeleton ( )

获取模型骨架对象

Returns
XSkeleton 模型骨架对象

◆ GetSkinModel()

function IXModelInstance GetSkinModel ( )

获取模型模板

Returns
XModel 模型模板

◆ GetSkinModelType()

function IXModelInstance GetSkinModelType ( )

获取模型对应的类型

Returns
number 模型对应的类型

◆ Hide()

function IXModelInstance Hide ( bHide  )

设置是否隐藏模型

Parameters
bHideboolean 是否隐藏模型
Returns
void

◆ IsHidden()

function IXModelInstance IsHidden ( )

判断模型是否隐藏

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

◆ IsMeshHide()

function IXModelInstance IsMeshHide ( szMeshName  )

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

Parameters
szMeshNamestring
Returns
boolean mesh是否隐藏

◆ new() [1/2]

function XHitMeshInfo new ( )

@type boolean

XHitMeshInfo_new00

Returns
XHitMeshInfo

XRAYTRACERT_new00

Returns
XRAYTRACERT

XOutputVertexTransform_new00

Returns
XOutputVertexTransform

@type boolean @type XRectI @type XRectI @type IXTexture2D XSubviewBackgroundFillParam_new00

Returns
XSubviewBackgroundFillParam

@type string @type boolean @type number @type number @type boolean @type number @type boolean @type boolean @type XSubviewBackgroundFillParam @type IXPrimitiveBase[] @type IXLightBase[] @type XBaseCamera XSubviewParamDesc_new00

Returns
XSubviewParamDesc

IXModelInstance_new00

Returns
IXModelInstance

◆ new() [2/2]

function XOutputVertexTransform new ( otherPosition  ,
otherTangentZ  ,
otherTangentX   
)

XOutputVertexTransform_new01

Parameters
otherPositionXVECTOR3
otherTangentZXVECTOR3
otherTangentXXVECTOR3
Returns
XOutputVertexTransform

◆ RayTraceToAABB() [1/2]

function IXModelInstance RayTraceToAABB ( vStart  ,
vDelta  ,
fFraction   
)

IXModelInstance_RayTraceToAABB00

Parameters
vStartXVECTOR3
vDeltaXVECTOR3
fFractionnumber
Returns
boolean

◆ RayTraceToAABB() [2/2]

function IXModelInstance RayTraceToAABB ( vStart  ,
vDelta   
)

IXModelInstance_RayTraceToAABB01

Parameters
vStartXVECTOR3
vDeltaXVECTOR3
Returns
number
boolean

◆ RayTraceToMesh() [1/2]

function IXModelInstance RayTraceToMesh ( vStart  ,
vDelta  ,
pOutTraceRt  ,
bForceTwoSided   
)

IXModelInstance_RayTraceToMesh00

Parameters
vStartXVECTOR3
vDeltaXVECTOR3
pOutTraceRtXRAYTRACERT
bForceTwoSidedboolean
Returns
boolean

◆ RayTraceToMesh() [2/2]

function IXModelInstance RayTraceToMesh ( vStart  ,
vDelta  ,
bForceTwoSided   
)

IXModelInstance_RayTraceToMesh01

Parameters
vStartXVECTOR3
vDeltaXVECTOR3
bForceTwoSidedboolean
Returns
XRAYTRACERT
boolean

◆ Release()

function IXModelInstance Release ( )

释放模型实例资源

Returns
void

◆ SetMeshAsCloth()

function IXModelInstance SetMeshAsCloth ( szMeshName  ,
bIsCloth   
)

设置指定Mesh为布料Mesh

Parameters
szMeshNamestring 指定Mesh名称
bIsClothboolean 是否为布料Mesh
Returns
void

◆ SetMeshHide()

function IXModelInstance SetMeshHide ( szMeshName  ,
bHide   
)

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

Parameters
szMeshNamestring
bHideboolean 是否隐藏模型
Returns
void

◆ SetRawMeshMtlIns()

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

IXModelInstance_SetRawMeshMtlIns00

Parameters
szSkinNamestring
szMeshNamestring
szMtlInsstring
nLODIndexnumber
Returns
void

◆ SetSkinCurrentLOD()

function IXModelInstance SetSkinCurrentLOD ( szSkinName  ,
nLODIndex   
)

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

Parameters
szSkinNamestring Skin名称
nLODIndexnumber LOD索引
Returns
void

◆ SetSubviewBackgroundFillParam()

function IXModelInstance SetSubviewBackgroundFillParam ( param  )

IXModelInstance_SetSubviewBackgroundFillParam00

Parameters
paramXSubviewBackgroundFillParam
Returns
void

◆ SetupSubview()

function IXModelInstance SetupSubview ( subViewParamDesc  )

IXModelInstance_SetupSubview00

Parameters
subViewParamDescXSubviewParamDesc
Returns
void

◆ Tick()

function IXModelInstance Tick ( nDeltaTime  ,
bClearPreMatrix   
)

更新当前模型实例

Parameters
nDeltaTimenumber 更新间隔
bClearPreMatrixboolean 是否清除之前的矩阵信息
Returns
void

◆ TickAABB()

function IXModelInstance TickAABB ( )

更新模型实例的AABB包围盒

Returns
void

◆ UpdateBlendMatrix()

function IXModelInstance UpdateBlendMatrix ( bClearPreMatrix  )

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

Parameters
bClearPreMatrixboolean 是否清除上一帧的矩阵信息
Returns
void

◆ UpdateBlendMatrixAndAABB()

function IXModelInstance UpdateBlendMatrixAndAABB ( )

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

Returns
void

◆ UpdateSkinInfoAndMeshInfo()

function IXModelInstance UpdateSkinInfoAndMeshInfo ( )

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

Returns
void

Variable Documentation

◆ pMeshMtlIns

XHitMeshInfo pMeshMtlIns = {}

◆ strHitBoneName

XHitMeshInfo strHitBoneName = ''

@type string

◆ strHitMeshName

XHitMeshInfo strHitMeshName = ''

@type string

◆ strHitSkinName

XHitMeshInfo strHitSkinName = ''

@type string

◆ XHitMeshInfo