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

函数

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, nPathIndex) end
 
function IXBrushPrimitive GetPath (nPathIndex) 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[]
 
function IXBrushManager SetPathPointMinDistance (fDistance) end
 
function IXBrushManager GetPathPointMinDistance () end
 
function IXBrushManager SetTexcoordLoopDistance (fDistance) end
 
function IXBrushManager GetTexcoordLoopDistance () end
 

变量

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

函数说明

◆ AddPathPoint()

function IXBrushPrimitive AddPathPoint ( vPoint  )

为画刷添加一个路径点

参数
vPointXVECTOR3 路径点的位置
返回
void

◆ CreateBrush()

function IXBrushManager CreateBrush ( param  )

@type XBrushShape[]

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

参数
paramIXBrushManager::BrushInitParam
返回
IXBrushPrimitive 如果创建失败,返回NULL

◆ GetColor()

function IXBrushPrimitive GetColor ( )

获取画刷当前的颜色

返回
XCOLORBASE 画刷当前颜色

◆ GetMaterialInstance()

function IXBrushPrimitive GetMaterialInstance ( )

获取画刷的材质实例

返回
IXMaterialInstance 画刷材质实例指针

◆ GetPath()

function IXBrushPrimitive GetPath ( nPathIndex  )

获取指定的整条路径

参数
nPathIndexnumber 路径的索引
返回
XVECTOR3[] 包含所有路径点的数组

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

参数
nPathIndexnumber 路径的索引
返回
XVECTOR3[]
boolean 路径不存在返回xfalse,存在返回xtrue

◆ GetPathNum()

function IXBrushPrimitive GetPathNum ( )

获取路径个数

返回
number 路径的个数

◆ GetPathPoint()

function IXBrushPrimitive GetPathPoint ( nIndex  ,
nPathIndex   
)

根据索引获取路径点位置

参数
nIndexnumber 路径点的索引
nPathIndexnumber
返回
XVECTOR3
boolean 路径点不存在返回xfalse,存在返回xtrue

◆ GetPathPointMinDistance()

function IXBrushManager GetPathPointMinDistance ( )

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

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

◆ GetPathPointsNum()

function IXBrushPrimitive GetPathPointsNum ( nPathIndex  )

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

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

◆ GetShapeGroup()

function IXBrushPrimitive GetShapeGroup ( )

获取ShapeGroup

返回
XBrushShape[] ShapeGroup

◆ GetSmoothAngle()

function IXBrushPrimitive GetSmoothAngle ( )

获取平滑角度

返回
number 角度Cos阈值

◆ GetTexcoordLoopDistance()

function IXBrushManager GetTexcoordLoopDistance ( )

获取纹理的重复距离

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

◆ new()

function IXBrushPrimitive new ( )

IXBrushPrimitive_new00

返回
IXBrushPrimitive

IXBrushManager_BrushInitParam_new00

返回
IXBrushManager__BrushInitParam

◆ NewPath()

function IXBrushPrimitive NewPath ( )

开始一段新的路径

返回
void

◆ RemoveAllPathPoints()

function IXBrushPrimitive RemoveAllPathPoints ( )

移除所有路径点

返回
void

◆ SetColor()

function IXBrushPrimitive SetColor ( color  )

设置画刷颜色

参数
colorXCOLORBASE 画刷颜色
返回
void

◆ SetPathPointMinDistance()

function IXBrushManager SetPathPointMinDistance ( fDistance  )

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

参数
fDistancenumber
返回
void

◆ SetSmoothAngle()

function IXBrushPrimitive SetSmoothAngle ( fCosAngle  )

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

参数
fCosAnglenumber
返回
void

◆ SetTexcoordLoopDistance()

function IXBrushManager SetTexcoordLoopDistance ( fDistance  )

设置纹理的重复距离

参数
fDistancenumber 纹理的重复距离.默认是1.0,最小是0.1
返回
void

变量说明

◆ IXBrushPrimitive

◆ TM_SHAPE

IXBrushPrimitive TM_SHAPE = 0

◆ TM_SHAPEGROUP

IXBrushPrimitive TM_SHAPEGROUP = 0

◆ TM_VERTEX

IXBrushPrimitive TM_VERTEX = 0