AR_Engine_SDK
|
Functions | |
function XEUtility | GetTransform (pActor, socketName) end |
function XEUtility | GetTransform (pActor, socketName, offset) end |
function XEUtility | GetTriangleFaceInfoByUV (pModelIns, szMeshName, szSkinName, uv, nOutTriIndex, outVertices, outVerIndices) end |
function XEUtility | GetVertexPositionFromIndex (pModelIns, szMeshName, szSkinName, nVertexIndex, vOutPos) end |
function XEUtility | GetVertexPositionFromIndex (pModelIns, szMeshName, szSkinName, nVertexIndex) end |
function XEUtility | GetVertexPositionInLocalSpaceFromIndex (pModelIns, szMeshName, szSkinName, nVertexIndex, vOutLocalPos) end |
function XEUtility | GetVertexPositionInLocalSpaceFromIndex (pModelIns, szMeshName, szSkinName, nVertexIndex) end |
function XEUtility | GetVertexIndexFromUV (pModelIns, szMeshName, szSkinName, uv, vOutVertexIndex) end |
function XEUtility | GetVertexIndexFromUV (pModelIns, szMeshName, szSkinName, uv) end |
function XEUtility | GetVertexPositionFromUV (pModelIns, szMeshName, szSkinName, uv, vOutPos) end |
function XEUtility | GetVertexPositionFromUV (pModelIns, szMeshName, szSkinName, uv) end |
function XEUtility | GetBestViewDisOfAABB (pViewPort, box) end |
function XEUtility | LookAtActorWithCurrentCameraRotation (pActor, fMultiNum, bNeedFly) end |
function XEUtility | LookAtComponentWithCurrentCameraRotation (pComponent, pWorld, fMultiNum, bNeedFly) end |
function XEUtility | LookAtBoundBoxWithCurrentCameraRotation (box, pWorld, fMultiNum, bNeedFly) end |
function XEUtility | LookAtBoundSphereWithCurrentCameraRotation (sphere, pWorld, fMultiNum, bNeedFly) end |
function XEUtility | MakeNameLegalForLua (szName) end |
function XEUtility | GetCameraFlyAnimCurveController () end |
function XEUtility | GetActorFlyAnimCurveController () end |
function XEUtility | GetActorComponentFlyAnimCurveController () end |
function XEUtility | TransformWorld2Screen (pViewPort, vWorld) end |
function XEUtility | TransformScreen2World (pViewPort, vScreenPos) end |
function XEUtility | CastRay (pViewport, vecScreenPoint, vecStart, vecDir) end |
function XEUtility | CastRay (pViewport, vecScreenPoint) end |
function XEUtility | PointToLineDistance (vecPoint, vecLinePoint, vecLineDirection, pFraction) end |
function XEUtility | DrawString (pCanvasBase, x, y, szString, clr) end |
function XEUtility | DrawQuad (pCanvasBase, x, y, nWidth, nHeight, clr, bSolid, pMat) end |
function XEUtility | Render2DLine (pCanvasBase, xBegin, yBegin, xEnd, yEnd, clr, pMat) end |
function XEUtility | Render2DCircle (pCanvasBase, vPos, fRadius, vStartNormalizedDir, vEndNormalizedDir, color, bClockWise, bSolid, pMat) end |
function XEUtility | GetCameraQuaternion (pCamera) end |
function XEUtility | GetCameraWorldMatrix (pCamera) end |
function XEUtility | AssignCameraParam (pTargetCamera, pSourceCamera) end |
function XEUtility | GetCircleTrackPoint () end |
function XEUtility | GetCircleTrackPoint (vCenter, fRadius, nSegment) end |
function XEUtility | GetCrossRectTrackPoint () end |
function XEUtility | GetCrossRectTrackPoint (vCenter, fRadius) end |
function XEUtility | GetSinTrackPoint () end |
function XEUtility | GetSinTrackPoint (vCenter, fAmplitude, fPeriod) end |
function XEUtility | GetViewPointOfLookingLocationAtScreen (pWorld, vLocation, nInnerPixel) end |
function XEUtility | MakePathSimple (fullPaths) end |
function XEUtility | GetAssetPackageValidPath (pFullRelativeAssetPackagePath, pEvalAssetPath, bNoRepeatPortionPath) end |
function XEUtility | GetSkinNames (pModelIns, aSkinNames) end |
function XEUtility | GetSkinNames (pModelIns) end |
function XEUtility | GetMeshNames (pModelIns, aMeshNames) end |
function XEUtility | GetMeshNames (pModelIns) end |
function XEUtility | IsExistActorInActorList (pActor, aActorList) end |
function XEUtility__MaterialKey | new () end |
@type number More... | |
function XEUtility__MaterialKey | new (_sid, _lid, _meid, _maid, _pid) end |
function XEUtility | ApplyMaterialParameter (pModelIns, mk, nParamIndex, fParamVal) end |
function XEUtility | ApplyMaterialParameter (pModelIns, mk, pTexPath) end |
function XEUtility | ApplyMaterialType (pModelIns, szSkinName, szMaterialInsName, szMTPath) end |
function XEUtility | ApplyMaterialTextureParameterValue (pModelIns, szSkinName, szMaterialInsName, szParamDesc, szTexPath) end |
function XEUtility | GetMaterialInstanceTexture (pModelIns, szSkinName, szMaterialInsName, szParamDesc) end |
function XEUtility | SetMaterialInstanceTexture (pModelIns, szSkinName, szMaterialInsName, szParamDesc, pTexture, bReleaseMatInsTex) end |
function XEUtility | ApplyMaterialVectorParameterValue (pModelIns, szSkinName, szMaterialInsName, szParamDesc, valueSlot) end |
function XEUtility | ApplyMaterialVectorParameterValue (pMaterialIns, szParamDesc, valueSlot) end |
function XEUtility | GetMaterailType (pModelIns, szSkinName, szMaterialInsName) end |
function XEUtility | GetMaterailTextureParameterValue (pModelIns, szSkinName, szMaterialInsName, szParamDesc) end |
function XEUtility | GetMaterialVectorParameterValue (pModelIns, szSkinName, szMaterialInsName, szParamDesc) end |
function XEUtility | GetMaterialParamTypeValue (pModelIns, szSkinName, szMaterialInsName, szParamDesc) end |
function XEUtility | ApplyMaterailInsParamToOther (pSourceMaterialIns, pDestMaterialIns) end |
function XEUtility | GetRawMeshNameByMaterialInsName (pModelIns, szSkinName, szMaterialInsName, nLod, vRawMeshName) end |
function XEUtility | GetRawMeshNameByMaterialInsName (pModelIns, szSkinName, szMaterialInsName, nLod) end |
function XEUtility | GetConstraintMotionTypeByName (str) end |
function XEUtility | GetConstraintMotionNameList () end |
function XEUtility | GetPhysResFitVertWeightTypeByName (str) end |
function XEUtility | GetAllPhysResFitVertWeightType () end |
function XEUtility | GetAllShapeMaterialParams () end |
function XEUtility | LoadPhysicsResFromPhy (pPhysicalMgr, szPhyPath, bReload) end |
function XEUtility | CreatePhysicsRes (pPhysicalMgr, eType, szName, szMdlPath, Params) end |
function XEUtility | GetXECoreActorTypes () end |
function XEUtility | BuildTex2DWithGreenScreen (pEngineIns, szTexPath, bDoMask, fMaskMinH, fMaskMaxH) end |
function XEUtility | BuildTex2DWithMaskIn2Parts (pEngineIns, szTexPath, nAlphaMaskMode, bDoMask) end |
function XEUtility | FullFillTex2DWithSpecificWHLT (pEngineIns, pTexOrigin, nWidth, nHeight, nLeft, nTop, fScale, bLimitSize1024) end |
function XEUtility | ReleaseTexture (pTexOrigin) end |
function XEUtility | LoadTex2D (pEngineIns, szTexPath) end |
function XEUtility | CreateDynamicTex2DRGBAWith1Mipmap (pEngineIns, nWidth, nHeight) end |
function XEUtility | CreateDynamicTex2DAlphaWith1Mipmap (pEngineIns, nWidth, nHeight) end |
function XEUtility | ResetDynamicTex2DRGBABuffer (pTex, nWidth, nHeight) end |
function XEUtility | CreateNewWorldIntoEngineInstance (szWorldName) end |
function XEUtility | AddWorldIntoEngineInstance (pWorldToAdd) end |
function XEUtility | GetXEEngineInstanceForWorld (pWorldContext) end |
function XEUtility | GetFileText (szRelativePath) end |
function XEUtility | OutputEngineString (szContent) end |
function XEUtility | SaveTextureToTGAFile (pTexture, strTGAPath, bOverturn, nInputW, nInputH) end |
function XEUtility | SaveTextureToPNGFile (pTexture, strPNGPath, bOverturn) end |
function XEUtility | SaveDataToPNGFile (pData, nWidth, nHeight, strPNGPath, bOverturn) end |
function XEUtility | ConvertTGATexture (szTGAFilePath, szOutputPath, bDeleteTGA) end |
function XEUtility | GetRefResourcePath (strInResource, strOutResources) end |
function XEUtility | GetRefResourcePath (strInResource) end |
function XEUtility | GetRefResourcePath (strInResource, strExtraResource, strOutResources) end |
function XEUtility | GetRefResourcePath (strInResource, strExtraResource) end |
function XEUtility | WashMatrixByFollowRules (eFollowRules, transformPre, matCur) end |
Variables | |
XEMacroRelationParamInfo = {} | |
XEMacroRelationParamInfo | strMacro = '' |
@type string More... | |
XEMacroRelationParamInfo | vRelationParam = {} |
@type string[] More... | |
XEMacroRelationParamInfo | vEliminateParam = {} |
@type string[] More... | |
XEUtility = {} | |
function XEUtility AddWorldIntoEngineInstance | ( | pWorldToAdd | ) |
function XEUtility ApplyMaterailInsParamToOther | ( | pSourceMaterialIns | , |
pDestMaterialIns | |||
) |
把一个材质实例的参数信息应用到另一个材质实例上
pSourceMaterialIns | IXMaterialInstance 源材质实例指针 |
pDestMaterialIns | IXMaterialInstance 目标材质实例指针 |
function XEUtility ApplyMaterialParameter | ( | pModelIns | , |
mk | , | ||
nParamIndex | , | ||
fParamVal | |||
) |
应用材质参数
pModelIns | IXModelInstance 模型实例指针 |
mk | XEUtility::MaterialKey 材质信息 |
nParamIndex | number |
fParamVal | number 对应参数分量nParamIndex的值 |
function XEUtility ApplyMaterialParameter | ( | pModelIns | , |
mk | , | ||
pTexPath | |||
) |
应用某个纹理材质参数
pModelIns | IXModelInstance 模型实例指针 |
mk | XEUtility::MaterialKey 材质信息 |
pTexPath | string 材质纹理路径 |
function XEUtility ApplyMaterialTextureParameterValue | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | , | ||
szTexPath | |||
) |
为某个材质应用纹理
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
szTexPath | string 纹理路径 |
function XEUtility ApplyMaterialType | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szMTPath | |||
) |
为某个材质应用材质模板类型
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szMTPath | string 要应用的材质模板类型路径 |
function XEUtility ApplyMaterialVectorParameterValue | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | , | ||
valueSlot | |||
) |
应用材质参数
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
valueSlot | XVECTOR4 要应用参数值,最多可以有4个分量 |
function XEUtility ApplyMaterialVectorParameterValue | ( | pMaterialIns | , |
szParamDesc | , | ||
valueSlot | |||
) |
应用材质参数
pMaterialIns | IXMaterialInstance 模型材质实例 |
szParamDesc | string 具体参数名称 |
valueSlot | XVECTOR4 要应用参数值,最多可以有4个分量 |
function XEUtility AssignCameraParam | ( | pTargetCamera | , |
pSourceCamera | |||
) |
把pSourceCamera的参数赋给pTargetCamera pTargetCamera 目标相机 pSourceCamera 源相机
pTargetCamera | XBaseCamera |
pSourceCamera | XBaseCamera |
function XEUtility BuildTex2DWithGreenScreen | ( | pEngineIns | , |
szTexPath | , | ||
bDoMask | , | ||
fMaskMinH | , | ||
fMaskMaxH | |||
) |
输入一张带绿幕图像,并生成纹理
pEngineIns | XEngineInstance |
szTexPath | string 纹理的路径 |
bDoMask | boolean |
fMaskMinH | number 如果包含绿幕,指定HSV颜色空间的掩码H的最小值 |
fMaskMaxH | number 如果包含绿幕,指定HSV颜色空间的掩码H的最大值 |
function XEUtility BuildTex2DWithMaskIn2Parts | ( | pEngineIns | , |
szTexPath | , | ||
nAlphaMaskMode | , | ||
bDoMask | |||
) |
输入一张带alpha-mask图像,并生成纹理
pEngineIns | XEngineInstance |
szTexPath | string 纹理的路径 |
nAlphaMaskMode | number |
bDoMask | boolean |
function XEUtility CastRay | ( | pViewport | , |
vecScreenPoint | , | ||
vecStart | , | ||
vecDir | |||
) |
根据像素坐标和视口,计算拾取射线。射线用近裁剪平面的三维坐标点和方向向量来表示
pViewport | XViewport [in]3D视口对象 |
vecScreenPoint | XVECTOR3 [in]像素坐标 |
vecStart | XVECTOR3 [out]像素坐标对应在近裁剪平面上的三维坐标点 |
vecDir | XVECTOR3 [out]射线的方向向量 |
function XEUtility CastRay | ( | pViewport | , |
vecScreenPoint | |||
) |
XEUtility_CastRay01
pViewport | XViewport |
vecScreenPoint | XVECTOR3 |
function XEUtility ConvertTGATexture | ( | szTGAFilePath | , |
szOutputPath | , | ||
bDeleteTGA | |||
) |
把TGA格式文件转换成ktx/pvr(注意:如果Lua使用,目前只支持PC端lua调用!!!)
szTGAFilePath | string TGA文件路径名 |
szOutputPath | string 输出的转换结果文件路径 |
bDeleteTGA | boolean 转换后,是否删除TGA文件 |
function XEUtility CreateDynamicTex2DAlphaWith1Mipmap | ( | pEngineIns | , |
nWidth | , | ||
nHeight | |||
) |
创建一张纹理,1通道,通常为Alpha数据
pEngineIns | XEngineInstance |
nWidth | number 宽度 |
nHeight | number 高度 |
function XEUtility CreateDynamicTex2DRGBAWith1Mipmap | ( | pEngineIns | , |
nWidth | , | ||
nHeight | |||
) |
function XEUtility CreateNewWorldIntoEngineInstance | ( | szWorldName | ) |
创建物理资源
pPhysicalMgr | IXPhysicalManager |
eType | number 物理资源类型 |
szName | string phy路径 |
szMdlPath | string mdl路径 |
Params | IXSkeletalPhysicsRes::XPhysResCreateParams 初始创建参数 |
绘制四边形
pCanvasBase | IXCanvasBase |
x | number 绘制的起始位置坐标的x分量 |
y | number 绘制的起始位置坐标的y分量 |
nWidth | number 绘制的四边形宽度 |
nHeight | number 绘制的四边形高度 |
clr | XCOLORBASE 绘制颜色(XCOLORBASE格式) |
bSolid | boolean 是否用颜色填充四边形区域,默认是false |
pMat | XMATRIX3 叠加矩阵,默认为空。(如果设置了叠加矩阵,绘制信息会叠加上这个矩阵数据) |
绘制字符串
pCanvasBase | IXCanvasBase |
x | number 绘制的位置坐标的x分量 |
y | number 绘制的位置坐标的y分量 |
szString | string 要绘制的字符串内容 |
clr | XCOLORBASE 绘制颜色(XCOLORBASE格式) |
function XEUtility FullFillTex2DWithSpecificWHLT | ( | pEngineIns | , |
pTexOrigin | , | ||
nWidth | , | ||
nHeight | , | ||
nLeft | , | ||
nTop | , | ||
fScale | , | ||
bLimitSize1024 | |||
) |
将输入(采样)纹理扩展成为一张完整纹理 (指定宽高,纹理的起始位置,纹理缩放),该函数需要较多计算,请勿在tick中调用
pEngineIns | XEngineInstance |
pTexOrigin | IXTexture2D 纹理实例 |
nWidth | number 原始纹理的宽度 |
nHeight | number 原始纹理的高度 |
nLeft | number 采样纹理在原始纹理空间中的左偏移 |
nTop | number 采样纹理在原始纹理空间中的上偏移 |
fScale | number 采样纹理相对原始纹理的缩放系数(0,1) |
bLimitSize1024 | boolean 是否限制为1024尺寸以内 |
function XEUtility GetActorComponentFlyAnimCurveController | ( | ) |
获取组件飞行曲线控制器
function XEUtility GetActorFlyAnimCurveController | ( | ) |
获取Actor飞行曲线控制器
function XEUtility GetAllPhysResFitVertWeightType | ( | ) |
获取骨骼物理资源顶点权重类型对应的字符串数组
function XEUtility GetAllShapeMaterialParams | ( | ) |
获取刚体形状表面材质的参数名称数组
function XEUtility GetAssetPackageValidPath | ( | pFullRelativeAssetPackagePath | , |
pEvalAssetPath | , | ||
bNoRepeatPortionPath | |||
) |
获取资源有效路径
pFullRelativeAssetPackagePath | string .xscene文件的全路径 |
pEvalAssetPath | string 资源路径 |
bNoRepeatPortionPath | boolean 是否去掉重复文件夹,默认是不去掉 |
function XEUtility GetBestViewDisOfAABB | ( | pViewPort | , |
box | |||
) |
function XEUtility GetCameraFlyAnimCurveController | ( | ) |
获取相机飞行曲线控制器
function XEUtility GetCameraQuaternion | ( | pCamera | ) |
function XEUtility GetCameraWorldMatrix | ( | pCamera | ) |
function XEUtility GetCircleTrackPoint | ( | ) |
获取圆形曲线点数组
XEUtility_GetCircleTrackPoint01
vCenter | XVECTOR3 |
fRadius | number |
nSegment | number |
function XEUtility GetConstraintMotionNameList | ( | ) |
获取所有的物理约束类型名称字符串
function XEUtility GetConstraintMotionTypeByName | ( | str | ) |
通过名称字符串获取对应的物理约束类型
str | string |
function XEUtility GetCrossRectTrackPoint | ( | ) |
获取对角矩形曲线点数组
XEUtility_GetCrossRectTrackPoint01
vCenter | XVECTOR3 |
fRadius | number |
function XEUtility GetFileText | ( | szRelativePath | ) |
使用引擎文件系统读取一个文件的所有内容。 注意,该函数不会作文件大小检查,如果文件过大,可能会造成应用内存溢出而崩溃
szRelativePath | string |
function XEUtility GetMaterailTextureParameterValue | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | |||
) |
获取材质纹理参数路径
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
function XEUtility GetMaterailType | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | |||
) |
获取材质类型名称
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
function XEUtility GetMaterialInstanceTexture | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | |||
) |
获取某个材质纹理对象
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
function XEUtility GetMaterialParamTypeValue | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | |||
) |
获取材质参数
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
function XEUtility GetMaterialVectorParameterValue | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | |||
) |
获取材质参数
pModelIns | IXModelInstance 模型实例指针 |
szSkinName | string 模型skin名字 |
szMaterialInsName | string 模型材质实例名字 |
szParamDesc | string 具体参数名称 |
function XEUtility GetMeshNames | ( | pModelIns | , |
aMeshNames | |||
) |
根据模型实例获取模型全部Mesh名称
pModelIns | IXModelInstance 模型实例指针 |
aMeshNames | string[] Mesh名称数组 |
function XEUtility GetMeshNames | ( | pModelIns | ) |
function XEUtility GetPhysResFitVertWeightTypeByName | ( | str | ) |
根据传入的字符串获取对应的骨骼物理资源顶点权重类型
str | string |
function XEUtility GetRawMeshNameByMaterialInsName | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
nLod | , | ||
vRawMeshName | |||
) |
根据材质实例名字获取对应的原始Mesh名字
pModelIns | IXModelInstance [in]模型实例指针 |
szSkinName | string [in]模型skin名字 |
szMaterialInsName | string [in]模型材质实例名字 |
nLod | number [in]指定的Lod |
vRawMeshName | string[] [out]原始Mesh名字数组 |
function XEUtility GetRawMeshNameByMaterialInsName | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
nLod | |||
) |
XEUtility_GetRawMeshNameByMaterialInsName01
pModelIns | IXModelInstance |
szSkinName | string |
szMaterialInsName | string |
nLod | number |
function XEUtility GetRefResourcePath | ( | strInResource | , |
strOutResources | |||
) |
获取某个资源引用的所有资源,包含自身
strInResource | string 输入的资源相对路径,包括扩展名 |
strOutResources | string[] 输出的资源相对路径,不会清空已有内容 |
function XEUtility GetRefResourcePath | ( | strInResource | ) |
XEUtility_GetRefResourcePath01
strInResource | string |
function XEUtility GetRefResourcePath | ( | strInResource | , |
strExtraResource | , | ||
strOutResources | |||
) |
XEUtility_GetRefResourcePath02
strInResource | string |
strExtraResource | string |
strOutResources | string[] |
function XEUtility GetRefResourcePath | ( | strInResource | , |
strExtraResource | |||
) |
XEUtility_GetRefResourcePath03
strInResource | string |
strExtraResource | string |
function XEUtility GetSinTrackPoint | ( | ) |
获取正弦曲线点数组
XEUtility_GetSinTrackPoint01
vCenter | XVECTOR3 |
fAmplitude | number |
fPeriod | number |
function XEUtility GetSkinNames | ( | pModelIns | , |
aSkinNames | |||
) |
根据模型实例获取模型全部skin名称
pModelIns | IXModelInstance 模型实例指针 |
aSkinNames | string[] skin名称数组 |
function XEUtility GetSkinNames | ( | pModelIns | ) |
function XEUtility GetTransform | ( | pActor | , |
socketName | |||
) |
function XEUtility GetTransform | ( | pActor | , |
socketName | , | ||
offset | |||
) |
XEUtility_GetTransform01
pActor | XEActor |
socketName | string |
offset | XVECTOR3 |
function XEUtility GetTriangleFaceInfoByUV | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
uv | , | ||
nOutTriIndex | , | ||
outVertices | , | ||
outVerIndices | |||
) |
@manual 通过UV获取三角形面信息 XEUtility_GetTriangleFaceInfoByUV_manual
pModelIns | IXModelInstance [in]模型实例指针 |
szMeshName | string [in]所在Mesh名字 |
szSkinName | string [in]所在Skin名字 |
uv | XVECTOR2 [in]UV信息 |
nOutTriIndex | number [out]匹配到的三角形面索引 |
outVertices | XSkinMeshVertex |
outVerIndices | number |
function XEUtility GetVertexIndexFromUV | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
uv | , | ||
vOutVertexIndex | |||
) |
通过UV获取顶点索引信息
pModelIns | IXModelInstance [in]模型实例指针 |
szMeshName | string [in]所在Mesh名字 |
szSkinName | string [in]所在Skin名字 |
uv | XVECTOR2 [in]UV信息 |
vOutVertexIndex | number [out]顶点索引 |
function XEUtility GetVertexIndexFromUV | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
uv | |||
) |
XEUtility_GetVertexIndexFromUV01
pModelIns | IXModelInstance |
szMeshName | string |
szSkinName | string |
uv | XVECTOR2 |
function XEUtility GetVertexPositionFromIndex | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
nVertexIndex | , | ||
vOutPos | |||
) |
通过顶点索引获取顶点Position信息
pModelIns | IXModelInstance [in]模型实例指针 |
szMeshName | string [in]所在Mesh名字 |
szSkinName | string [in]所在Skin名字 |
nVertexIndex | number [in]顶点索引 |
vOutPos | XVECTOR3 [out]顶点pos信息 |
function XEUtility GetVertexPositionFromIndex | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
nVertexIndex | |||
) |
XEUtility_GetVertexPositionFromIndex01
pModelIns | IXModelInstance |
szMeshName | string |
szSkinName | string |
nVertexIndex | number |
function XEUtility GetVertexPositionFromUV | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
uv | , | ||
vOutPos | |||
) |
通过UV获取顶点Postion信息
pModelIns | IXModelInstance [in]模型实例指针 |
szMeshName | string [in]所在Mesh名字 |
szSkinName | string [in]所在Skin名字 |
uv | XVECTOR2 [in]UV信息 |
vOutPos | XVECTOR3 [out]顶点pos信息 |
function XEUtility GetVertexPositionFromUV | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
uv | |||
) |
XEUtility_GetVertexPositionFromUV01
pModelIns | IXModelInstance |
szMeshName | string |
szSkinName | string |
uv | XVECTOR2 |
function XEUtility GetVertexPositionInLocalSpaceFromIndex | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
nVertexIndex | , | ||
vOutLocalPos | |||
) |
通过顶点索引获取模型空间顶点Position信息
pModelIns | IXModelInstance [in]模型实例指针 |
szMeshName | string [in]所在Mesh名字 |
szSkinName | string [in]所在Skin名字 |
nVertexIndex | number [in]顶点索引 |
vOutLocalPos | XVECTOR3 |
function XEUtility GetVertexPositionInLocalSpaceFromIndex | ( | pModelIns | , |
szMeshName | , | ||
szSkinName | , | ||
nVertexIndex | |||
) |
XEUtility_GetVertexPositionInLocalSpaceFromIndex01
pModelIns | IXModelInstance |
szMeshName | string |
szSkinName | string |
nVertexIndex | number |
function XEUtility GetViewPointOfLookingLocationAtScreen | ( | pWorld | , |
vLocation | , | ||
nInnerPixel | |||
) |
获取从渲染窗口边缘指向某个3D点的方向线段起始位置
pWorld | XEWorld 当前世界指针 |
vLocation | XVECTOR3 [in]当前世界中的3D点 |
nInnerPixel | number [in]此值越大,方向线段越长,默认是128像素 |
function XEUtility GetXECoreActorTypes | ( | ) |
获取所有Actor类型
function XEUtility GetXEEngineInstanceForWorld | ( | pWorldContext | ) |
function XEUtility IsExistActorInActorList | ( | pActor | , |
aActorList | |||
) |
function XEUtility LoadPhysicsResFromPhy | ( | pPhysicalMgr | , |
szPhyPath | , | ||
bReload | |||
) |
从硬盘上加载一个物理资源(碰撞体)
pPhysicalMgr | IXPhysicalManager |
szPhyPath | string phy的路径 |
bReload | boolean 是否重加载,默认为false |
function XEUtility LoadTex2D | ( | pEngineIns | , |
szTexPath | |||
) |
function XEUtility LookAtActorWithCurrentCameraRotation | ( | pActor | , |
fMultiNum | , | ||
bNeedFly | |||
) |
定位Actor(Camera移动带有飞行曲线,但Camera姿态保持不变)
pActor | XEActor 要定位的Actor |
fMultiNum | number 倍数,默认为1,倍数越大,最终定位的相机位置越远 |
bNeedFly | boolean 是否让相机移动带有飞行曲线,默认为true |
function XEUtility LookAtBoundBoxWithCurrentCameraRotation | ( | box | , |
pWorld | , | ||
fMultiNum | , | ||
bNeedFly | |||
) |
function XEUtility LookAtBoundSphereWithCurrentCameraRotation | ( | sphere | , |
pWorld | , | ||
fMultiNum | , | ||
bNeedFly | |||
) |
定位球状包围盒(Camera移动带有飞行曲线,但Camera姿态保持不变)
sphere | XCusSphere 要定位的球状包围盒 |
pWorld | XEWorld 包围盒所在的世界 |
fMultiNum | number 倍数,默认为1,倍数越大,最终定位的相机位置越远 |
bNeedFly | boolean 是否让相机移动带有飞行曲线,默认为true |
function XEUtility LookAtComponentWithCurrentCameraRotation | ( | pComponent | , |
pWorld | , | ||
fMultiNum | , | ||
bNeedFly | |||
) |
定位组件(Camera移动带有飞行曲线,但Camera姿态保持不变)
pComponent | XEActorComponent 要定位的组件 |
pWorld | XEWorld 组件所在的世界 |
fMultiNum | number 倍数,默认为1,倍数越大,最终定位的相机位置越远 |
bNeedFly | boolean 是否让相机移动带有飞行曲线,默认为true |
function XEUtility MakeNameLegalForLua | ( | szName | ) |
替换名字字符串中的非法字符,保证名字对lua合法
szName | cppstring 要替换的名字字符串 |
function XEUtility MakePathSimple | ( | fullPaths | ) |
从完整的名字中得到名字(带后缀名)
fullPaths | string[] [in][out]一组名字 |
function XEUtility__MaterialKey new | ( | ) |
@type number
@type XEUtility::MaterialKey
@type number @type number @type number @type number @type string @type string @type string useful for the material instance XEUtility_MaterialKey_new00
@type XSkin @type IXMaterialInstance @type XMaterialSupportMacro @type XMaterialParamDescInfo @type XMaterialParamTypeValue @type boolean XEUtility_MaterialInfo_new00
function XEUtility__MaterialKey new | ( | _sid | , |
_lid | , | ||
_meid | , | ||
_maid | , | ||
_pid | |||
) |
XEUtility_MaterialKey_new01
_sid | number |
_lid | number |
_meid | number |
_maid | number |
_pid | number |
function XEUtility OutputEngineString | ( | szContent | ) |
将日志使用引擎输出
szContent | string |
function XEUtility PointToLineDistance | ( | vecPoint | , |
vecLinePoint | , | ||
vecLineDirection | , | ||
pFraction | |||
) |
计算空间中的一点(vecPoint)到指定直线的距离,其中根据一个点 vecLinePoint 和 方向向量 vecLineDirection 可确定一条直线, 此处 vecLineDirection 要求单位化
vecPoint | XVECTOR3 |
vecLinePoint | XVECTOR3 |
vecLineDirection | XVECTOR3 空间直线的方向向量(单位化) |
pFraction | number 表示vecPoint投影到直线上的投影点与vecLinePoint的(带符号,表示与线的方向向量是否方向一致)距离 |
function XEUtility ReleaseTexture | ( | pTexOrigin | ) |
function XEUtility Render2DCircle | ( | pCanvasBase | , |
vPos | , | ||
fRadius | , | ||
vStartNormalizedDir | , | ||
vEndNormalizedDir | , | ||
color | , | ||
bClockWise | , | ||
bSolid | , | ||
pMat | |||
) |
绘制圆弧线或扇形线(注意:屏幕坐标,Y轴向下, X轴向左)
pCanvasBase | IXCanvasBase |
vPos | XVECTOR2 圆弧或扇形圆心点坐标 |
fRadius | number 圆弧或扇形半径 |
vStartNormalizedDir | XVECTOR2 圆弧或扇形起始单位方向向量 |
vEndNormalizedDir | XVECTOR2 圆弧或扇形结束单位方向向量 |
color | XCOLORBASE 绘制颜色(XCOLORBASE格式) |
bClockWise | boolean 绘制方向,面向屏幕,xtrue:顺时针,xflase:逆时针,默认是xtrue |
bSolid | boolean 是否用颜色填充绘制的区域,默认是false |
pMat | XMATRIX3 叠加矩阵,默认为空。(如果设置了叠加矩阵,绘制信息会叠加上这个矩阵数据) |
function XEUtility Render2DLine | ( | pCanvasBase | , |
xBegin | , | ||
yBegin | , | ||
xEnd | , | ||
yEnd | , | ||
clr | , | ||
pMat | |||
) |
绘制2D直线
pCanvasBase | IXCanvasBase |
xBegin | number 直线的起始点坐标x分量 |
yBegin | number 直线的起始点坐标y分量 |
xEnd | number 直线的结束点坐标x分量 |
yEnd | number 直线的结束点坐标y分量 |
clr | XCOLORBASE 绘制颜色(XCOLORBASE格式) |
pMat | XMATRIX3 叠加矩阵,默认为空。(如果设置了叠加矩阵,绘制信息会叠加上这个矩阵数据) |
function XEUtility ResetDynamicTex2DRGBABuffer | ( | pTex | , |
nWidth | , | ||
nHeight | |||
) |
function XEUtility SaveDataToPNGFile | ( | pData | , |
nWidth | , | ||
nHeight | , | ||
strPNGPath | , | ||
bOverturn | |||
) |
把数据保存成PNG格式文件,需要保证数据有效且包括RGBA4个通道!
pData | userdata 保存的数据指针 |
nWidth | number 图片宽度 |
nHeight | number 图片高度 |
strPNGPath | string png文件名 |
bOverturn | boolean 是否翻转(引擎的纹理不用翻转) |
function XEUtility SaveTextureToPNGFile | ( | pTexture | , |
strPNGPath | , | ||
bOverturn | |||
) |
把纹理保存成PNG格式文件
pTexture | IXTexture 保存的纹理指针(目前只支持纹理格式是XTF_R8G8B8A8!!!) |
strPNGPath | string png文件名 |
bOverturn | boolean 是否翻转(引擎的纹理不用翻转) |
function XEUtility SaveTextureToTGAFile | ( | pTexture | , |
strTGAPath | , | ||
bOverturn | , | ||
nInputW | , | ||
nInputH | |||
) |
把纹理保存成TGA格式文件
pTexture | IXTexture 保存的纹理指针(目前只支持纹理格式是XTF_R8G8B8A8!!!) |
strTGAPath | string tga文件名 |
bOverturn | boolean 是否翻转(引擎的纹理不用翻转) |
nInputW | number 存成图片的宽(默认为0,直接使用纹理的宽高,如果nInputWnInputH均不为0,则存成对应大小) |
nInputH | number 存成图片的高(默认为0) |
function XEUtility SetMaterialInstanceTexture | ( | pModelIns | , |
szSkinName | , | ||
szMaterialInsName | , | ||
szParamDesc | , | ||
pTexture | , | ||
bReleaseMatInsTex | |||
) |
XEUtility_SetMaterialInstanceTexture00
pModelIns | IXModelInstance |
szSkinName | string |
szMaterialInsName | string |
szParamDesc | string |
pTexture | IXTexture2D |
bReleaseMatInsTex | boolean |
function XEUtility TransformScreen2World | ( | pViewPort | , |
vScreenPos | |||
) |
把屏幕坐标转换为世界坐标
pViewPort | XEViewport ViewPort指针 |
vScreenPos | XVECTOR3 要转换的屏幕坐标 |
function XEUtility TransformWorld2Screen | ( | pViewPort | , |
vWorld | |||
) |
把世界坐标转换为屏幕坐标
pViewPort | XEViewport ViewPort指针 |
vWorld | XVECTOR3 要转换的世界坐标 |
function XEUtility WashMatrixByFollowRules | ( | eFollowRules | , |
transformPre | , | ||
matCur | |||
) |
根据跟随规则清洗矩阵
eFollowRules | number |
transformPre | XETransform |
matCur | XMATRIX4 |
XEMacroRelationParamInfo strMacro = '' |
@type string
XEMacroRelationParamInfo vEliminateParam = {} |
@type string[]
XEMacroRelationParamInfo vRelationParam = {} |
@type string[]
XEUtility = {} |