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

#include <IX2DShape.h>

类 IX2DShape 继承关系图:
Inheritance graph

#include <IX2DShape.h>

类 IX2DCircleShape 继承关系图:
Inheritance graph

#include <IX2DShape.h>

类 IX2DEdgeShape 继承关系图:
Inheritance graph

#include <IX2DShape.h>

类 IX2DPolygonShape 继承关系图:
Inheritance graph

函数

function IX2DShape GetType () end
 
function IX2DCircleShape SetRadius (fRadius) end
 
function IX2DCircleShape GetRadius () end
 
function IX2DEdgeShape Set (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
 

变量

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

函数说明

◆ CreateShape()

function X2DShapeFactory CreateShape ( eType  )

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

参数
eTypenumber 形状类型
返回
IX2DShape 形状指针

◆ DestoryShape()

function X2DShapeFactory DestoryShape ( pShape  )

销毁一个形状

参数
pShapeIX2DShape 形状指针
返回
void

◆ Get()

function IX2DEdgeShape Get ( )

获取形状

返回
XVECTOR2
XVECTOR2
void

◆ GetRadius()

function IX2DCircleShape GetRadius ( )

获取圆形半径

返回
number 圆形半径

◆ GetType()

function IX2DShape GetType ( )

获取形状类型,并返回

返回
number

◆ Set() [1/2]

function IX2DPolygonShape Set ( points  ,
nCnt   
)

设置形状

参数
pointsXVECTOR2
nCntnumber
返回
void

◆ Set() [2/2]

function IX2DEdgeShape Set ( v1  ,
v2   
)

设置形状

参数
v1XVECTOR2 一端的顶点位置
v2XVECTOR2
返回
void

◆ SetAsBox() [1/2]

function IX2DPolygonShape SetAsBox ( hx  ,
hy   
)

设置为Box形状

参数
hxnumber box的一半的宽
hynumber box的一半的高
返回
void

◆ SetAsBox() [2/2]

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

设置为Box形状

参数
hxnumber box的一半的宽
hynumber box的一半的高
vCenterXVECTOR2 box的中心点
fAnglenumber box的旋转角度
返回
void

◆ SetRadius()

function IX2DCircleShape SetRadius ( fRadius  )

设置圆形半径

参数
fRadiusnumber 圆形半径
返回
void

变量说明

◆ 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