AR_Engine_SDK
Functions | Variables
XViewport.lua File Reference

Functions

function XViewport new () end
 
function XViewport Init (pViewPortParam) end
 
function XViewport Release () end
 
function XViewport SetParam (pViewPortParam) end
 
function XViewport TransformWorldToScreen (vWorldPoint, vScreenPoint) end
 
function XViewport TransformWorldToScreen (vWorldPoint) end
 
function XViewport InvTransformScreenToWorld (vScreePoint, vWorldPoint) end
 
function XViewport InvTransformScreenToWorld (vScreePoint) end
 
function XViewport SetCamera (pCamera) end
 
function XViewport GetViewportParam () end
 
function XViewport GetCamera () end
 
function XViewport GetViewScale () end
 
function XViewport GetClearColor () end
 
function XViewport SetClearColor (clearColor) end
 
function XViewport EnableClearColor (bClearColor) end
 
function XViewport IsClearColor () end
 
function XViewport EnableSwapBuffers (bSwapBuffers) end
 
function XViewport IsSwapBuffers () end
 

Variables

 XViewport = {}
 

Function Documentation

◆ EnableClearColor()

function XViewport EnableClearColor ( bClearColor  )

设置是否启用当前视口背景清除色

Parameters
bClearColorboolean [类型][xbool]是否启用视口背景清除色
Returns
void

◆ EnableSwapBuffers()

function XViewport EnableSwapBuffers ( bSwapBuffers  )

XViewport_EnableSwapBuffers00

Parameters
bSwapBuffersboolean
Returns
void

◆ GetCamera()

function XViewport GetCamera ( )

获取当前视口相机

Returns
XBaseCamera [类型][XBaseCamera]当前视口相机

◆ GetClearColor()

function XViewport GetClearColor ( )

获取当前视口背景清除色

Returns
number [类型][XCOLOR]视口背景清除色

◆ GetViewportParam()

function XViewport GetViewportParam ( )

获取当前视口参数

Returns
XVIEWPORTPARAMETER [类型][XVIEWPORTPARAMETER]当前视口参数

◆ GetViewScale()

function XViewport GetViewScale ( )

获取当前视口缩放矩阵

Returns
XMATRIX4 [类型][XMATRIX4]视口缩放矩阵

◆ Init()

function XViewport Init ( pViewPortParam  )

初始化

Parameters
pViewPortParamXVIEWPORTPARAMETER [类型][XVIEWPORTPARAMETER]视口参数
Returns
boolean [类型][xbool]是否初始化成功

◆ InvTransformScreenToWorld() [1/2]

function XViewport InvTransformScreenToWorld ( vScreePoint  ,
vWorldPoint   
)

XViewport_InvTransformScreenToWorld00

Parameters
vScreePointXVECTOR3
vWorldPointXVECTOR3
Returns
boolean

◆ InvTransformScreenToWorld() [2/2]

function XViewport InvTransformScreenToWorld ( vScreePoint  )

XViewport_InvTransformScreenToWorld01

Parameters
vScreePointXVECTOR3
Returns
XVECTOR3
boolean

◆ IsClearColor()

function XViewport IsClearColor ( )

判断是否启用当前视口背景清除色

Returns
boolean [类型][xbool]是否启用视口背景清除色

◆ IsSwapBuffers()

function XViewport IsSwapBuffers ( )

XViewport_IsSwapBuffers00

Returns
boolean

◆ new()

function XViewport new ( )

XViewport_new00

Returns
XViewport

◆ Release()

function XViewport Release ( )

释放当前视口中的资源

Returns
boolean [类型][xbool]是否释放成功

◆ SetCamera()

function XViewport SetCamera ( pCamera  )

给当前视口设置相机

Parameters
pCameraXBaseCamera [类型][XBaseCamera]相机指针
Returns
boolean [类型][xbool]是否设置成功

◆ SetClearColor()

function XViewport SetClearColor ( clearColor  )

设置当前视口背景清除色

Parameters
clearColornumber [类型][XCOLOR]视口背景清除色
Returns
void

◆ SetParam()

function XViewport SetParam ( pViewPortParam  )

设置视口参数

Parameters
pViewPortParamXVIEWPORTPARAMETER [类型][XVIEWPORTPARAMETER]视口参数
Returns
boolean [类型][xbool]是否初始化成功

◆ TransformWorldToScreen() [1/2]