AR_Engine_SDK
函数 | 变量
XECustomPrimtive.lua 文件参考

#include <XECustomPrimtive.h>

类 XECustomPrimtiveMeshData 继承关系图:
Inheritance graph

#include <XECustomPrimtive.h>

类 XECustomPrimtive 继承关系图:
Inheritance graph

函数

function XECustomMeshVertex new () end
 
function XECustomPrimtiveMeshData SetVertex (vVertices) end
 
function XECustomPrimtiveMeshData SetIndex (vIndices) end
 
function XECustomPrimtiveMeshData GetAABB () end
 
function XECustomPrimtive CreateMesh () end
 
function XECustomPrimtive RemoveMesh (pMeshData) end
 
function XECustomPrimtive GetMeshesNum () end
 
function XECustomPrimtive GetMeshByIndex (nIndex) end
 
function XECustomPrimtive SetMaterialIns (pMaterialIns, bReleaseWhenDelted) end
 
function XECustomPrimtive SetMaterialIns (strMaterialTemp, bReleaseWhenDelted) end
 
function XECustomPrimtive SetMaterialNormal () end
 
function XECustomPrimtive SetMaterialTransparent () end
 
function XECustomPrimtive GetMaterialIns () end
 
function XECustomPrimtive SetMaterialTextureByName (strParamName, strTexturePath) end
 
function XECustomPrimtive GetComponent () end
 

变量

 XECustomMeshVertex = {}
 

函数说明

◆ CreateMesh()

function XECustomPrimtive CreateMesh ( )

创建一个Mesh,用于填充需要渲染的顶点和顶点索引数据

返回
XECustomPrimtiveMeshData 返回创建的Mesh数据的指针

◆ GetAABB()

function XECustomPrimtiveMeshData GetAABB ( )

获取该顶点集合的AABB包围盒

返回
XCusAABB 返回该顶点集合的包围盒

◆ GetComponent()

function XECustomPrimtive GetComponent ( )

获取当前Primtive所依附的Component,通常情况是XECustomMeshComponent类型的Cmoponent

返回
XEActorComponent 返回当前依附的Component

◆ GetMaterialIns()

function XECustomPrimtive GetMaterialIns ( )

获取渲染时使用的材质实例,默认的材质实例为渲染半透明模型的材质实例

返回
IXMaterialInstance 返回当前使用的材质实例

◆ GetMeshByIndex()

function XECustomPrimtive GetMeshByIndex ( nIndex  )

根据索引获取已经被创建的Mesh数据

参数
nIndexnumber Mesh数据的索引值,范围为0~N,N是当前Mesh总数
返回
XECustomPrimtiveMeshData

◆ GetMeshesNum()

function XECustomPrimtive GetMeshesNum ( )

获取当前Mesh总数

返回
number 返回当前Mesh总数

◆ new()

function XECustomMeshVertex new ( )

XECustomMeshVertex_new00

返回
XECustomMeshVertex

◆ RemoveMesh()

function XECustomPrimtive RemoveMesh ( pMeshData  )

移除一个已经被创建的Mesh数据

参数
pMeshDataXECustomPrimtiveMeshData 要移除的Mesh数据
返回
void

◆ SetIndex()

function XECustomPrimtiveMeshData SetIndex ( vIndices  )

设置顶点索引数据

参数
vIndicesnumber[] 顶点索引数组,每个索引的类型为xuint16
返回
void

◆ SetMaterialIns() [1/2]

function XECustomPrimtive SetMaterialIns ( pMaterialIns  ,
bReleaseWhenDelted   
)

设置渲染时使用的材质实例,一般不会手动更改,默认的材质实例为渲染半透明模型的材质实例

参数
pMaterialInsIXMaterialInstance
bReleaseWhenDeltedboolean 当该Primtive被销毁时,是否需要帮忙释放pMaterialIns。如果不需要释放就传xfalse,需要就传xtrue
返回
void

◆ SetMaterialIns() [2/2]

function XECustomPrimtive SetMaterialIns ( strMaterialTemp  ,
bReleaseWhenDelted   
)

XECustomPrimtive_SetMaterialIns01

参数
strMaterialTempstring
bReleaseWhenDeltedboolean
返回
void

◆ SetMaterialNormal()

function XECustomPrimtive SetMaterialNormal ( )

XECustomPrimtive_SetMaterialNormal00

返回
void

◆ SetMaterialTextureByName()

function XECustomPrimtive SetMaterialTextureByName ( strParamName  ,
strTexturePath   
)

XECustomPrimtive_SetMaterialTextureByName00

参数
strParamNamestring
strTexturePathstring
返回
void

◆ SetMaterialTransparent()

function XECustomPrimtive SetMaterialTransparent ( )

XECustomPrimtive_SetMaterialTransparent00

返回
void

◆ SetVertex()

function XECustomPrimtiveMeshData SetVertex ( vVertices  )

设置顶点数据

参数
vVerticesXECustomMeshVertex[]
返回
void

变量说明

◆ XECustomMeshVertex