|
AR_Engine_SDK
|
Functions | |
| function XEMath | InvSqrt (fNumber) end |
| function XEMath | FastAsin (Value) end |
| function XEMath | ClampAxis (radian) end |
| function XEMath | NormalizeAxis (radian) end |
| function XEMath | Xmod (X, Y) end |
| function XEMath | Atan2 (Y, X) end |
| function XEMath | AreaOfTriangle (v1, v2, v3) end |
| function XEMath | IsNegativeFloat (A) end |
| function XEMath | IsNaN (A) end |
| function XEMath | IsFinite (A) end |
| function XEMath | IsNearlyZero (Value, ErrorTolerance) end |
| function XEMath | SinCos (ScalarSin, ScalarCos, Value) end |
| function XEMath | QuaternionToEuler (quat) end |
| function XEMath | EulerToMatrix (fPitch, fYaw, fRoll) end |
| function XEMath | EulerToQuaternion (fPitch, fYaw, fRoll) end |
| function XEMath | DirAndUpToQuaternion (vForwardDir, vUp) end |
| function XEMath | QuaternionToDirAndUp (quat) end |
| function XEMath | LocationDirAndUpToMatrix (vLocation, vForwardDir, vUp) end |
| function XEMath | MatrixToLocationAndDirAndUp (mat4) end |
| function XEMath | GetScaleFromMatrix (mat) end |
| function XEMath | GetQuaternionFromMatrix (mat) end |
| function XEMath | GetMatrixFromQuaternion (quat) end |
| function XEMath | EliminateScaleFromMatrix (mat) end |
| function XEMath | EliminateRotateFromMatrix (mat) end |
| function XEMath | EliminateTranslateFromMatrix (mat) end |
| function XEMath | GenerateTranslateMatrixForVector (vTranslate) end |
| function XEMath | GenerateScaleMatrixForVector (vScale) end |
| function XEMath | GenerateScaleMatrixForVector (vScale, vOriginPoint) end |
| function XEMath | RotateMatrixWorld (mat, quat) end |
| function XEMath | ScaleMatrixWorld (mat, vScale) end |
| function XEMath | RotateVector (quat, vec) end |
| function XEMath | UnrotateVector (quat, vec) end |
| function XEMath | Is2MatrixClosed (mat1, mat2, fEpsilon) end |
| function XEMath | GenerateOrthoProjMatrix (fLeft, fRight, fButtom, fTop, fNear, fFar) end |
| function XEMath | GenerateMostNearSizeWithRate (vOriginSize, fSizeRate, nStepSize) end |
| function XEMath | ComputerMin2nSubSquare (nSize) end |
| function XEMath | GenerateMatrix (vTranslate, quatRotate, vScale) end |
| function XEMath | MultMatrix (mat1, mat2) end |
| function XEMath | GetCameraClipSpaceTransformMatrix () end |
Variables | |
| XEMath = {} | |
| function XEMath AreaOfTriangle | ( | v1 | , |
| v2 | , | ||
| v3 | |||
| ) |
| function XEMath Atan2 | ( | Y | , |
| X | |||
| ) |
计算 y/x 反正切值.
| Y | number 输入值Y |
| X | number 输入值X |
| function XEMath ClampAxis | ( | radian | ) |
把一个角度规范化到[0,2*PI).
| radian | number 输入值 |
| function XEMath ComputerMin2nSubSquare | ( | nSize | ) |
计算下个2的幂值
| nSize | number 输入数值 |
| function XEMath DirAndUpToQuaternion | ( | vForwardDir | , |
| vUp | |||
| ) |
| function XEMath EliminateRotateFromMatrix | ( | mat | ) |
| function XEMath EliminateScaleFromMatrix | ( | mat | ) |
| function XEMath EliminateTranslateFromMatrix | ( | mat | ) |
| function XEMath EulerToMatrix | ( | fPitch | , |
| fYaw | , | ||
| fRoll | |||
| ) |
| function XEMath EulerToQuaternion | ( | fPitch | , |
| fYaw | , | ||
| fRoll | |||
| ) |
欧拉角转四元数
| fPitch | number 俯仰角 |
| fYaw | number 偏航角 |
| fRoll | number 翻滚角 |
| function XEMath FastAsin | ( | Value | ) |
计算一个浮点数的反正弦.
| Value | number 输入值 |
| function XEMath GenerateMatrix | ( | vTranslate | , |
| quatRotate | , | ||
| vScale | |||
| ) |
| function XEMath GenerateMostNearSizeWithRate | ( | vOriginSize | , |
| fSizeRate | , | ||
| nStepSize | |||
| ) |
| function XEMath GenerateOrthoProjMatrix | ( | fLeft | , |
| fRight | , | ||
| fButtom | , | ||
| fTop | , | ||
| fNear | , | ||
| fFar | |||
| ) |
生成一个正交投影矩阵
| fLeft | number 左平面到原点距离 |
| fRight | number 右平面到原点距离 |
| fButtom | number 底平面到原点距离 |
| fTop | number 上平面到原点距离 |
| fNear | number 近平面到原点距离 |
| fFar | number 远平面到原点距离 |
| function XEMath GenerateScaleMatrixForVector | ( | vScale | ) |
| function XEMath GenerateScaleMatrixForVector | ( | vScale | , |
| vOriginPoint | |||
| ) |
| function XEMath GenerateTranslateMatrixForVector | ( | vTranslate | ) |
| function XEMath GetCameraClipSpaceTransformMatrix | ( | ) |
获取引擎在相机裁剪空间里的变换矩阵(如果按OpenGL顶点NDC坐标对顶点变换,则MVP矩阵需要乘以此矩阵)
| function XEMath GetMatrixFromQuaternion | ( | quat | ) |
| function XEMath GetQuaternionFromMatrix | ( | mat | ) |
| function XEMath GetScaleFromMatrix | ( | mat | ) |
| function XEMath InvSqrt | ( | fNumber | ) |
平方根倒数
| fNumber | number 输入数值 |
| function XEMath Is2MatrixClosed | ( | mat1 | , |
| mat2 | , | ||
| fEpsilon | |||
| ) |
| function XEMath IsFinite | ( | A | ) |
如果是一个有限数值返回true (not NaN and not Infinity).
| A | number |
| function XEMath IsNaN | ( | A | ) |
判定浮点型数据是否溢出
| A | number 浮点数 |
| function XEMath IsNearlyZero | ( | Value | , |
| ErrorTolerance | |||
| ) |
判断一个浮点数是否接近0.
| Value | number |
| ErrorTolerance | number |
| function XEMath IsNegativeFloat | ( | A | ) |
是否是负浮点数.
| A | number 判断的浮点数 |
| function XEMath LocationDirAndUpToMatrix | ( | vLocation | , |
| vForwardDir | , | ||
| vUp | |||
| ) |
| function XEMath MatrixToLocationAndDirAndUp | ( | mat4 | ) |
| function XEMath MultMatrix | ( | mat1 | , |
| mat2 | |||
| ) |
| function XEMath NormalizeAxis | ( | radian | ) |
把一个角度规范化到(-PI,PI].
| radian | number 输入值 |
| function XEMath QuaternionToDirAndUp | ( | quat | ) |
| function XEMath QuaternionToEuler | ( | quat | ) |
四元数转欧拉角
| quat | XQUATERNION 输入的四元数 |
| function XEMath RotateMatrixWorld | ( | mat | , |
| quat | |||
| ) |
| function XEMath RotateVector | ( | quat | , |
| vec | |||
| ) |
| function XEMath ScaleMatrixWorld | ( | mat | , |
| vScale | |||
| ) |
| function XEMath SinCos | ( | ScalarSin | , |
| ScalarCos | , | ||
| Value | |||
| ) |
返回对Value的 sin值、cos值.
| ScalarSin | number [out]Value的sin值 |
| ScalarCos | number [out]Value的cos值 |
| Value | number 输入数据 |
| function XEMath UnrotateVector | ( | quat | , |
| vec | |||
| ) |
| function XEMath Xmod | ( | X | , |
| Y | |||
| ) |
取模运算.
| X | number 输入值X |
| Y | number 输入值Y |
| XEMath = {} |
1.8.15