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 XECustomPrimtiveMeshData AutoCalculateTangentDir () 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 SetMaterialTextureInstanceByName (strParamName, pTex) end
 
function XECustomPrimtive GetComponent () end
 
function XECustomPrimtive SetInCameraClipSpace (bIn) end
 
function XECustomPrimtive IsInCameraClipSpace () end
 

变量

 XECustomMeshVertex = {}
 

函数说明

◆ AutoCalculateTangentDir()

function XECustomPrimtiveMeshData AutoCalculateTangentDir ( )

自动计算顶点的Tangent方向(根据uv和position), 如有需要计算光照且顶点数据中没有切线方向数据时

返回
void

◆ 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总数

◆ IsInCameraClipSpace()

function XECustomPrimtive IsInCameraClipSpace ( )

是否直接在相机的裁剪空间中渲染。

返回
boolean

◆ new()

function XECustomMeshVertex new ( )

XECustomMeshVertex_new00

返回
XECustomMeshVertex

◆ RemoveMesh()

function XECustomPrimtive RemoveMesh ( pMeshData  )

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

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

◆ SetInCameraClipSpace()

function XECustomPrimtive SetInCameraClipSpace ( bIn  )

设置直接在相机的裁剪空间中渲染。此时会直接认为原点位于相机裁剪空间中的原点处

参数
bInboolean
返回
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   
)

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

参数
strParamNamestring 材质纹理参数
strTexturePathstring 材质纹理路径。纹理加载后,在该函数中引用将+1
返回
void 返回当前使用的材质实例

◆ SetMaterialTextureInstanceByName()

function XECustomPrimtive SetMaterialTextureInstanceByName ( strParamName  ,
pTex   
)

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

参数
strParamNamestring 材质纹理参数
pTexIXTexture 纹理实例。该纹理实例在该函数中不会再添加引用。请在外部设置好引用
返回
void 返回当前使用的材质实例

◆ SetMaterialTransparent()

function XECustomPrimtive SetMaterialTransparent ( )

XECustomPrimtive_SetMaterialTransparent00

返回
void

◆ SetVertex()

function XECustomPrimtiveMeshData SetVertex ( vVertices  )

设置顶点数据

参数
vVerticesXECustomMeshVertex[]
返回
void

变量说明

◆ XECustomMeshVertex