AR_Engine_SDK
Functions | Variables
IX2DShape.lua File Reference
类 IX2DShape 继承关系图:
Inheritance graph
类 IX2DCircleShape 继承关系图:
Inheritance graph
类 IX2DEdgeShape 继承关系图:
Inheritance graph
类 IX2DPolygonShape 继承关系图:
Inheritance graph

Functions

function IX2DShape GetType () end
 
function IX2DCircleShape SetRadius (fRadius) end
 
function IX2DCircleShape GetRadius () end
 
function IX2DEdgeShape Set (v1, v2) end
 
function IX2DEdgeShape Get (v1, v2) end
 
function IX2DEdgeShape Get () end
 
function IX2DPolygonShape Set (points, nCnt) end
 
function IX2DPolygonShape SetAsBox (hx, hy) end
 
function IX2DPolygonShape SetAsBox (hx, hy, vCenter, fAngle) end
 
function X2DShapeFactory CreateShape (eType) end
 
function X2DShapeFactory DestoryShape (pShape) end
 

Variables

 IX2DShape = {}
 
IX2DShape X_CIRCLE = 0
 
IX2DShape X_EDGE = 0
 
IX2DShape X_POLYGON = 0
 
IX2DShape X_NUM = 0
 

Function Documentation

◆ CreateShape()

function X2DShapeFactory CreateShape ( eType  )

创建一个形状,并返回相应的形状指针

Parameters
eTypenumber 形状类型
Returns
IX2DShape 形状指针

◆ DestoryShape()

function X2DShapeFactory DestoryShape ( pShape  )

销毁一个形状

Parameters
pShapeIX2DShape 形状指针
Returns
void

◆ Get() [1/2]

function IX2DEdgeShape Get ( v1  ,
v2   
)

获取形状

Parameters
v1XVECTOR2 一端的顶点位置
v2XVECTOR2
Returns
void

◆ Get() [2/2]

function IX2DEdgeShape Get ( )

IX2DEdgeShape_Get01

Returns
XVECTOR2
XVECTOR2
void

◆ GetRadius()

function IX2DCircleShape GetRadius ( )

获取圆形半径

Returns
number 圆形半径

◆ GetType()

function IX2DShape GetType ( )

获取形状类型,并返回

Returns
number

◆ Set() [1/2]

function IX2DEdgeShape Set ( v1  ,
v2   
)

设置形状

Parameters
v1XVECTOR2 一端的顶点位置
v2XVECTOR2
Returns
void

◆ Set() [2/2]

function IX2DPolygonShape Set ( points  ,
nCnt   
)

设置形状

Parameters
pointsXVECTOR2
nCntnumber
Returns
void

◆ SetAsBox() [1/2]

function IX2DPolygonShape SetAsBox ( hx  ,
hy   
)

设置为Box形状

Parameters
hxnumber box的一半的宽
hynumber box的一半的高
Returns
void

◆ SetAsBox() [2/2]

function IX2DPolygonShape SetAsBox ( hx  ,
hy  ,
vCenter  ,
fAngle   
)

设置为Box形状

Parameters
hxnumber box的一半的宽
hynumber box的一半的高
vCenterXVECTOR2 box的中心点
fAnglenumber box的旋转角度
Returns
void

◆ SetRadius()

function IX2DCircleShape SetRadius ( fRadius  )

设置圆形半径

Parameters
fRadiusnumber 圆形半径
Returns
void

Variable Documentation

◆ IX2DShape

IX2DShape = {}

◆ X_CIRCLE

IX2DShape X_CIRCLE = 0

◆ X_EDGE

IX2DShape X_EDGE = 0

◆ X_NUM

IX2DShape X_NUM = 0

◆ X_POLYGON

IX2DShape X_POLYGON = 0