AR_Engine_SDK
Functions | Variables
XBrush.lua File Reference
类 IXBrushPrimitive 继承关系图:
Inheritance graph
类 IXBrushManager 继承关系图:
Inheritance graph

Functions

function IXBrushPrimitive new () end
 
function IXBrushPrimitive AddPathPoint (vPoint) end
 
function IXBrushPrimitive NewPath () end
 
function IXBrushPrimitive GetPathNum () end
 
function IXBrushPrimitive GetPathPointsNum (nPathIndex) end
 
function IXBrushPrimitive GetPathPoint (nIndex, vPos, nPathIndex) end
 
function IXBrushPrimitive GetPathPoint (nIndex, nPathIndex) end
 
function IXBrushPrimitive GetPath (nPathIndex) end
 
function IXBrushPrimitive GetPath (nPathIndex, vPath) end
 
function IXBrushPrimitive RemoveAllPathPoints () end
 
function IXBrushPrimitive GetShapeGroup () end
 
function IXBrushPrimitive GetMaterialInstance () end
 
function IXBrushPrimitive SetColor (color) end
 
function IXBrushPrimitive GetColor () end
 
function IXBrushPrimitive SetSmoothAngle (fCosAngle) end
 
function IXBrushPrimitive GetSmoothAngle () end
 
function IXBrushManager CreateBrush (param) end
 @type XBrushShape[] More...
 
function IXBrushManager SetPathPointMinDistance (fDistance) end
 
function IXBrushManager GetPathPointMinDistance () end
 
function IXBrushManager SetTexcoordLoopDistance (fDistance) end
 
function IXBrushManager GetTexcoordLoopDistance () end
 

Variables

 IXBrushPrimitive = {}
 
IXBrushPrimitive TM_VERTEX = 0
 
IXBrushPrimitive TM_SHAPE = 0
 
IXBrushPrimitive TM_SHAPEGROUP = 0
 

Function Documentation

◆ AddPathPoint()

function IXBrushPrimitive AddPathPoint ( vPoint  )

为画刷添加一个路径点

Parameters
vPointXVECTOR3 路径点的位置
Returns
void

◆ CreateBrush()

function IXBrushManager CreateBrush ( param  )

@type XBrushShape[]

@type string @readonly @type number @type XCOLORBASE 创建一个画刷

Parameters
paramIXBrushManager::BrushInitParam
Returns
IXBrushPrimitive 如果创建失败,返回NULL

◆ GetColor()

function IXBrushPrimitive GetColor ( )

获取画刷当前的颜色

Returns
XCOLORBASE 画刷当前颜色

◆ GetMaterialInstance()

function IXBrushPrimitive GetMaterialInstance ( )

获取画刷的材质实例

Returns
IXMaterialInstance 画刷材质实例指针

◆ GetPath() [1/2]

function IXBrushPrimitive GetPath ( nPathIndex  )

获取指定的整条路径

Parameters
nPathIndexnumber 路径的索引
Returns
XVECTOR3[] 包含所有路径点的数组

IXBrushPrimitive_GetPath02

Parameters
nPathIndexnumber
Returns
XVECTOR3[]
boolean

◆ GetPath() [2/2]

function IXBrushPrimitive GetPath ( nPathIndex  ,
vPath   
)

获取指定的整条路径,安全版,效率较低

Parameters
nPathIndexnumber 路径的索引
vPathXVECTOR3[]
Returns
boolean 路径不存在返回xfalse,存在返回xtrue

◆ GetPathNum()

function IXBrushPrimitive GetPathNum ( )

获取路径个数

Returns
number 路径的个数

◆ GetPathPoint() [1/2]

function IXBrushPrimitive GetPathPoint ( nIndex  ,
vPos  ,
nPathIndex   
)

根据索引获取路径点位置

Parameters
nIndexnumber 路径点的索引
vPosXVECTOR3
nPathIndexnumber
Returns
boolean 路径点不存在返回xfalse,存在返回xtrue

◆ GetPathPoint() [2/2]

function IXBrushPrimitive GetPathPoint ( nIndex  ,
nPathIndex   
)

IXBrushPrimitive_GetPathPoint01

Parameters
nIndexnumber
nPathIndexnumber
Returns
XVECTOR3
boolean

◆ GetPathPointMinDistance()

function IXBrushManager GetPathPointMinDistance ( )

获取路径点之间的最小间隔

Returns
number 路径点之间的最小间隔,默认是0.1

◆ GetPathPointsNum()

function IXBrushPrimitive GetPathPointsNum ( nPathIndex  )

获取某条路径上路径点的个数

Parameters
nPathIndexnumber
Returns
number 路径点的个数,索引错误返回-1

◆ GetShapeGroup()

function IXBrushPrimitive GetShapeGroup ( )

获取ShapeGroup

Returns
XBrushShape[] ShapeGroup

◆ GetSmoothAngle()

function IXBrushPrimitive GetSmoothAngle ( )

获取平滑角度

Returns
number 角度Cos阈值

◆ GetTexcoordLoopDistance()

function IXBrushManager GetTexcoordLoopDistance ( )

获取纹理的重复距离

Returns
number 纹理的重复距离.默认是1.0,最小是0.1

◆ new()

function IXBrushPrimitive new ( )

IXBrushPrimitive_new00

Returns
IXBrushPrimitive

IXBrushManager_BrushInitParam_new00

Returns
IXBrushManager__BrushInitParam

◆ NewPath()

function IXBrushPrimitive NewPath ( )

开始一段新的路径

Returns
void

◆ RemoveAllPathPoints()

function IXBrushPrimitive RemoveAllPathPoints ( )

移除所有路径点

Returns
void

◆ SetColor()

function IXBrushPrimitive SetColor ( color  )

设置画刷颜色

Parameters
colorXCOLORBASE 画刷颜色
Returns
void

◆ SetPathPointMinDistance()

function IXBrushManager SetPathPointMinDistance ( fDistance  )

设置路径点之间的最小间隔,默认是0.1

Parameters
fDistancenumber
Returns
void

◆ SetSmoothAngle()

function IXBrushPrimitive SetSmoothAngle ( fCosAngle  )

设置平滑角度,两段路径之间角度的cos值小于该值时会生成额外的顶点用于平滑

Parameters
fCosAnglenumber
Returns
void

◆ SetTexcoordLoopDistance()

function IXBrushManager SetTexcoordLoopDistance ( fDistance  )

设置纹理的重复距离

Parameters
fDistancenumber 纹理的重复距离.默认是1.0,最小是0.1
Returns
void

Variable Documentation

◆ IXBrushPrimitive

◆ TM_SHAPE

IXBrushPrimitive TM_SHAPE = 0

◆ TM_SHAPEGROUP

IXBrushPrimitive TM_SHAPEGROUP = 0

◆ TM_VERTEX

IXBrushPrimitive TM_VERTEX = 0