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

#include <XELightComponent.h>

类 XELightComponent 继承关系图:
Inheritance graph

函数

function XELightComponent new () end
 
function XELightComponent SetAsDirLight (color, vDir, fLuminance) end
 
function XELightComponent SetAsEnvLight (color, index, fLuminance) end
 
function XELightComponent SetAsPointLight (desc) end
 
function XELightComponent SetAsSpotLight (desc) end
 
function XELightComponent SetLightRadius (fRadius) end
 
function XELightComponent SetLightFallOffExponent (fFallOffExponent) end
 
function XELightComponent SetLightConeInnerAngle (fAngle) end
 
function XELightComponent SetLightConeOuterAngle (fAngle) end
 
function XELightComponent GetDirLightDir () end
 
function XELightComponent GetLightColor () end
 
function XELightComponent SetLightColor (color) end
 
function XELightComponent GetLightLuminance () end
 
function XELightComponent SetLightLuminance (fLuminance) end
 
function XELightComponent IsCastShadow () end
 
function XELightComponent SetCastShadow (bCastShadow) end
 
function XELightComponent GetShadowBias () end
 
function XELightComponent SetShadowBias (fShadowBias) end
 
function XELightComponent GetLight () end
 
function XELightComponent GetLightIndex () end
 
function XELightComponent IsLightReady () end
 

变量

 XELightComponent = {}
 

函数说明

◆ GetDirLightDir()

function XELightComponent GetDirLightDir ( )

获取平行光(也叫方向光)的方向

返回
XVECTOR3

◆ GetLight()

function XELightComponent GetLight ( )

获取引擎封装的光源对象

返回
IXLightBase

◆ GetLightColor()

function XELightComponent GetLightColor ( )

获取光源颜色

返回
XCOLORBASE

◆ GetLightIndex()

function XELightComponent GetLightIndex ( )

获取环境光索引

返回
number

◆ GetLightLuminance()

function XELightComponent GetLightLuminance ( )

获取光照强度

返回
number

◆ GetShadowBias()

function XELightComponent GetShadowBias ( )

XELightComponent_GetShadowBias00

返回
number

◆ IsCastShadow()

function XELightComponent IsCastShadow ( )

XELightComponent_IsCastShadow00

返回
boolean

◆ IsLightReady()

function XELightComponent IsLightReady ( )

光照是否准备好

返回
boolean

◆ new()

function XELightComponent new ( )

XELightComponent_new00

返回
XELightComponent

◆ SetAsDirLight()

function XELightComponent SetAsDirLight ( color  ,
vDir  ,
fLuminance   
)

创建引擎中封装的代表平行光的 IXLightBase 对象,并设置光源颜色、方向和强度

参数
colorXCOLORBASE 光源颜色
vDirXVECTOR3 平行光的方向,单位化的向量
fLuminancenumber 光照强度
返回
void

◆ SetAsEnvLight()

function XELightComponent SetAsEnvLight ( color  ,
index  ,
fLuminance   
)

创建引擎中封装的代表环境光的 IXLightBase 对象,并设置光源颜色、索引和强度

参数
colorXCOLORBASE 光源颜色
indexnumber 环境光的索引,目前引擎仅支持两个环境光
fLuminancenumber 光照强度
返回
void

◆ SetAsPointLight()

function XELightComponent SetAsPointLight ( desc  )

创建引擎中封装的代表点光源的 IXLightBase 对象,并设置光源参数

参数
descXPointLightDesc 点光源参数结构体
返回
void

◆ SetAsSpotLight()

function XELightComponent SetAsSpotLight ( desc  )

创建引擎中封装的代表聚光源的 IXLightBase 对象,并设置光源参数

参数
descXSpotLightDesc 聚光源参数结构体
返回
void

◆ SetCastShadow()

function XELightComponent SetCastShadow ( bCastShadow  )

XELightComponent_SetCastShadow00

参数
bCastShadowboolean
返回
void

◆ SetLightColor()

function XELightComponent SetLightColor ( color  )

设置光源颜色

参数
colorXCOLORBASE
返回
boolean

◆ SetLightConeInnerAngle()

function XELightComponent SetLightConeInnerAngle ( fAngle  )

对于聚光源,可以设置光源内锥角

参数
fAnglenumber 角度
返回
void

◆ SetLightConeOuterAngle()

function XELightComponent SetLightConeOuterAngle ( fAngle  )

对于聚光源,可以设置光源外锥角

参数
fAnglenumber 角度
返回
void

◆ SetLightFallOffExponent()

function XELightComponent SetLightFallOffExponent ( fFallOffExponent  )

对于点光源或者聚光源,可以设置光源衰减值

参数
fFallOffExponentnumber 光源衰减值
返回
void

◆ SetLightLuminance()

function XELightComponent SetLightLuminance ( fLuminance  )

设置光照强度

参数
fLuminancenumber
返回
boolean

◆ SetLightRadius()

function XELightComponent SetLightRadius ( fRadius  )

对于点光源或者聚光源,可以设置光源半径

参数
fRadiusnumber 光源半径
返回
void

◆ SetShadowBias()

function XELightComponent SetShadowBias ( fShadowBias  )

XELightComponent_SetShadowBias00

参数
fShadowBiasnumber
返回
void

变量说明

◆ XELightComponent