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

#include <XLightBase.h>

XPointLightDesc 的协作图:
Collaboration graph

#include <XLightBase.h>

XSpotLightDesc 的协作图:
Collaboration graph

#include <XLightBase.h>

XReflectionEnvironment 的协作图:
Collaboration graph

#include <XLightBase.h>

类 IXLightManager 继承关系图:
Inheritance graph

#include <XLightBase.h>

类 IXLightBase 继承关系图:
Inheritance graph

#include <XLightBase.h>

类 IXDirectionLight 继承关系图:
Inheritance graph

#include <XLightBase.h>

类 IXEnvironmentLight 继承关系图:
Inheritance graph

#include <XLightBase.h>

类 IXPointLight 继承关系图:
Inheritance graph

#include <XLightBase.h>

类 IXSpotLight 继承关系图:
Inheritance graph

函数

function XPointLightDesc new () end
 @type XCOLORBASE
 
function XPointLightDesc new (_clrColorVal, _fLuminance, _vPos, _fRadius, _fFallOffExponent) end
 
function XSpotLightDesc new (_clrColorVal, _fLuminance, _vPos, _vDir, _fRadius, _fFallOffExponent, _fConeInnerAngle, _fConeOuterAngle) end
 
function IXLightManager Init () end
 
function IXLightManager Release () end
 
function IXLightManager CreateDirectionLight (vDir, clrColorVal, fLuminance) end
 
function IXLightManager CreateEnvironmentLight (clrColorVal, fLuminance) end
 
function IXLightManager CreatePointLight (desc) end
 
function IXLightManager CreateSpotLight (desc) end
 
function IXLightManager ReleaseLight (pLight) end
 
function IXLightBase GetType () end
 
function IXLightBase GetAABB () end
 
function IXLightBase GetRadius () end
 
function IXLightBase GetColor () end
 
function IXLightBase GetColorValue () end
 
function IXLightBase GetLuminance () end
 
function IXLightBase SetColorValue (clrColorVal) end
 
function IXLightBase SetLuminance (fLuminance) end
 
function IXLightBase IsEnable () end
 
function IXLightBase Enable (enabled) end
 
function IXLightBase IsCastShadow () end
 
function IXLightBase EnableCastShadow (bEnabled) end
 
function IXLightBase GetBeLightedPrimitives (primitives) end
 
function IXDirectionLight GetDir () end
 
function IXDirectionLight SetDir (vDir) end
 
function IXPointLight GetPos () end
 
function IXPointLight SetPos (vPos) end
 
function IXPointLight SetRadius (fRadius) end
 
function IXPointLight GetFallOffExponent () end
 
function IXPointLight SetFallOffExponent (fFallOffExponent) end
 
function IXSpotLight GetConeInnerAngle () end
 
function IXSpotLight SetConeInnerAngle (fAngle) end
 
function IXSpotLight GetConeOuterAngle () end
 
function IXSpotLight SetConeOuterAngle (fAngle) end
 

变量

 XLT_DIRECTION = 0
 
 XLT_POINT = 0
 
 XLT_SPOT = 0
 
 XLT_ENV = 0
 
 XLT_NUM = 0
 
 XPointLightDesc = {}
 
XPointLightDesc clrColorVal = {}
 @type XCOLORBASE
 
XPointLightDesc fLuminance = 0
 @type number
 
XPointLightDesc vPos = {}
 @type XVECTOR3
 
XPointLightDesc fRadius = 0
 @type number
 
XPointLightDesc fFallOffExponent = 0
 @type number
 

函数说明

◆ CreateDirectionLight()

function IXLightManager CreateDirectionLight ( vDir  ,
clrColorVal  ,
fLuminance   
)

创建方向光,并设置光源颜色、方向和强度

参数
vDirXVECTOR3 平行光的方向,单位化的向量
clrColorValXCOLORBASE 光源颜色
fLuminancenumber 光照强度
返回
IXLightBase 创建的方向光对象指针

◆ CreateEnvironmentLight()

function IXLightManager CreateEnvironmentLight ( clrColorVal  ,
fLuminance   
)

创建环境光对象,并设置光源颜色和强度

参数
clrColorValXCOLORBASE 光源颜色
fLuminancenumber 光照强度
返回
IXLightBase 创建的环境光对象指针

◆ CreatePointLight()

function IXLightManager CreatePointLight ( desc  )

创建点光源对象,并设置光源参数

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

◆ CreateSpotLight()

function IXLightManager CreateSpotLight ( desc  )

创建聚光源对象,并设置光源参数

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

◆ Enable()

function IXLightBase Enable ( enabled  )

设置光源是否开启

参数
enabledboolean 光源是否开启
返回
void

◆ EnableCastShadow()

function IXLightBase EnableCastShadow ( bEnabled  )

开启或关闭投射阴影

参数
bEnabledboolean 开启或关闭投射阴影
返回
void

◆ GetAABB()

function IXLightBase GetAABB ( )

获取光源AABB包围盒信息

返回
XCusAABB 光源AABB包围盒信息

◆ GetBeLightedPrimitives()

function IXLightBase GetBeLightedPrimitives ( primitives  )

IXLightBase_GetBeLightedPrimitives00

参数
primitivesIXPrimitiveBase[]
返回
IXPrimitiveBase[]
void

◆ GetColor()

function IXLightBase GetColor ( )

获取光源颜色

返回
number 光源颜色(XCOLOR格式)

◆ GetColorValue()

function IXLightBase GetColorValue ( )

获取光源颜色

返回
XCOLORBASE 光源颜色(XCOLORBASE格式)

◆ GetConeInnerAngle()

function IXSpotLight GetConeInnerAngle ( )

获取聚光源内锥角

返回
number 聚光源内锥角大小

◆ GetConeOuterAngle()

function IXSpotLight GetConeOuterAngle ( )

获取聚光源外锥角

返回
number 聚光源外锥角大小

◆ GetDir()

function IXDirectionLight GetDir ( )

获取方向光方向

返回
XVECTOR3 方向光方向向量

◆ GetFallOffExponent()

function IXPointLight GetFallOffExponent ( )

获取光源衰减值

返回
number 光源衰减值

◆ GetLuminance()

function IXLightBase GetLuminance ( )

获取光照强度

返回
number 光照强度

◆ GetPos()

function IXPointLight GetPos ( )

获取点光源位置

返回
XVECTOR3 点光源位置

◆ GetRadius()

function IXLightBase GetRadius ( )

获取光源影响半径

返回
number 光源影响半径

◆ GetType()

function IXLightBase GetType ( )

获取光源类型

返回
number 光源类型

◆ Init()

function IXLightManager Init ( )

初始化

返回
boolean 是否初始化成功

◆ IsCastShadow()

function IXLightBase IsCastShadow ( )

是否投射阴影

返回
boolean 是否投射阴影

◆ IsEnable()

function IXLightBase IsEnable ( )

获取光源是否开启

返回
boolean 光源是否开启

◆ new() [1/3]

function XPointLightDesc new ( )

@type XCOLORBASE

XPointLightDesc_new00

返回
XPointLightDesc

@type number @type XVECTOR3 @type XVECTOR3 @type number @type number @type number @type number XSpotLightDesc_new00

返回
XSpotLightDesc

◆ new() [2/3]

function XPointLightDesc new ( _clrColorVal  ,
_fLuminance  ,
_vPos  ,
_fRadius  ,
_fFallOffExponent   
)

XPointLightDesc_new01

参数
_clrColorValXCOLORBASE
_fLuminancenumber
_vPosXVECTOR3
_fRadiusnumber
_fFallOffExponentnumber
返回
XPointLightDesc

◆ new() [3/3]

function XSpotLightDesc new ( _clrColorVal  ,
_fLuminance  ,
_vPos  ,
_vDir  ,
_fRadius  ,
_fFallOffExponent  ,
_fConeInnerAngle  ,
_fConeOuterAngle   
)

XSpotLightDesc_new01

参数
_clrColorValXCOLORBASE
_fLuminancenumber
_vPosXVECTOR3
_vDirXVECTOR3
_fRadiusnumber
_fFallOffExponentnumber
_fConeInnerAnglenumber
_fConeOuterAnglenumber
返回
XSpotLightDesc

◆ Release()

function IXLightManager Release ( )

释放资源

返回
void

◆ ReleaseLight()

function IXLightManager ReleaseLight ( pLight  )

释放对应的光源资源

参数
pLightIXLightBase 要释放的光源对象指针
返回
void

◆ SetColorValue()

function IXLightBase SetColorValue ( clrColorVal  )

设置光源颜色

参数
clrColorValXCOLORBASE 光源颜色
返回
void

◆ SetConeInnerAngle()

function IXSpotLight SetConeInnerAngle ( fAngle  )

设置聚光源内锥角

参数
fAnglenumber 聚光源内锥角大小
返回
void

◆ SetConeOuterAngle()

function IXSpotLight SetConeOuterAngle ( fAngle  )

设置聚光源外锥角

参数
fAnglenumber 聚光源外锥角大小
返回
void

◆ SetDir()

function IXDirectionLight SetDir ( vDir  )

设置方向光方向

参数
vDirXVECTOR3 方向光方向向量
返回
void

◆ SetFallOffExponent()

function IXPointLight SetFallOffExponent ( fFallOffExponent  )

可以设置光源衰减值

参数
fFallOffExponentnumber 光源衰减值
返回
void

◆ SetLuminance()

function IXLightBase SetLuminance ( fLuminance  )

设置光照强度

参数
fLuminancenumber 光照强度
返回
void

◆ SetPos()

function IXPointLight SetPos ( vPos  )

设置点光源位置

参数
vPosXVECTOR3 点光源位置
返回
void

◆ SetRadius()

function IXPointLight SetRadius ( fRadius  )

设置点光源影响半径

参数
fRadiusnumber 点光源影响半径
返回
void

变量说明

◆ clrColorVal

XPointLightDesc clrColorVal = {}

@type XCOLORBASE

◆ fFallOffExponent

XPointLightDesc fFallOffExponent = 0

@type number

◆ fLuminance

XPointLightDesc fLuminance = 0

@type number

◆ fRadius

XPointLightDesc fRadius = 0

@type number

◆ vPos

XPointLightDesc vPos = {}

@type XVECTOR3

◆ XLT_DIRECTION

XLT_DIRECTION = 0

◆ XLT_ENV

XLT_ENV = 0

◆ XLT_NUM

XLT_NUM = 0

◆ XLT_POINT

XLT_POINT = 0

◆ XLT_SPOT

XLT_SPOT = 0

◆ XPointLightDesc