Class: Matrix4
4*4 的矩阵
Properties
Methods
- init
- lookAt
- multiply
- multiplyMatrices
- multiplyPoint3
- multiplyVector4
- transformVector4
- perspectiveMultiplyPoint3
- perspective
- ortho
- orthoZO
- orthoOffCenter
- transformDir
- fromToRotation
- append
- add
- sub
- mult
- appendRotation
- createByRotation
- appendScale
- createByScale
- appendTranslation
- clone
- copyRowFrom
- copyRowTo
- copyFrom
- copyRawDataTo
- copyColFrom
- copyColTo
- copyToMatrix3D
- makeRotationFromQuaternion
- decompose
- getEuler
- compose
- deltaTransformVector
- identity
- fill
- invers33
- invert
- transformPoint
- transformVector
- transpose
- getAxisRotation
- getPosition
- toString
- lerp
- get
- set
- getMaxScaleOnAxis
- sanitizeEuler
- makePositive
- matrixToEuler
- translate
- setTRInverse
- setScale
- matrix_Multiply
- matrix_Append
- matrix_RotateY
- matrix_Rotate
- makeBasis
- setElements
- makeRotationAxis
Constructors
Accessors
Properties
blockBytes
▪ Static
blockBytes: number
区块大小
Defined in
count
▪ Static
count: number
= 31000
初始化的区块数量
Defined in
EPSILON
▪ Static
EPSILON: number
= 0.000001
保留的最小精度
Defined in
index
• index: number
= 0
矩阵索引值
Defined in
help_matrix_0
▪ Static
help_matrix_0: Matrix4
临时缓存矩阵
Defined in
help_matrix_1
▪ Static
help_matrix_1: Matrix4
临时缓存矩阵
Defined in
help_matrix_2
▪ Static
help_matrix_2: Matrix4
临时缓存矩阵
Defined in
rawData
• rawData: Float32Array
Language
zh_CN 一个由 16 个数字组成的矢量,其中,每四个元素可以是 4x4 矩阵的一行或一列
Version
UU3D 3.0
Platform
Web,Native
Defined in
src/engine/math/Matrix4.ts:133
Methods
init
▸ Static
init(count
): Promise
<void
>
初始化矩阵,分配wasm内存
Parameters
Name | Type | Description |
---|---|---|
count | number | 分配的区块数量 |
Returns
Promise
<void
>
Defined in
lookAt
▸ lookAt(eye
, at
, up?
): void
Language
zh_CN 生成一个注视目标的矩阵.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Default value | Description |
---|---|---|---|
eye | Vector3 | undefined | 眼睛的位置. |
at | Vector3 | undefined | 目标的位置. |
up | Vector3 | Vector3.Y_AXIS | 向上的方向. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:169
multiply
▸ multiply(mat4
): void
Language
zh_CN 矩阵相乘.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
mat4 | Matrix4 | 相乘的矩阵 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:223
multiplyMatrices
▸ multiplyMatrices(a
, b
): Matrix4
Parameters
Name | Type |
---|---|
a | Matrix4 |
b | Matrix4 |
Returns
Defined in
src/engine/math/Matrix4.ts:266
multiplyPoint3
▸ multiplyPoint3(v
, output?
): Vector3
当前矩阵与3维相乘
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 相剩的3维向量 |
output? | Vector3 | 结果向量 |
Returns
结果向量
Defined in
src/engine/math/Matrix4.ts:312
multiplyVector4
▸ multiplyVector4(a
, out?
): Vector3
Parameters
Name | Type |
---|---|
a | Vector3 |
out? | Vector3 |
Returns
Defined in
src/engine/math/Matrix4.ts:323
transformVector4
▸ transformVector4(v
, target?
): Vector3
Language
zh_CN 用当前矩阵变换一个3D向量
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 变换的向量 w 会进行计算 |
target? | Vector3 | 如果当前参数为null那么就会new一个新的Vector3返回 |
Returns
Vector3 变换后的向量
Defined in
src/engine/math/Matrix4.ts:359
perspectiveMultiplyPoint3
▸ perspectiveMultiplyPoint3(v
, output
): boolean
将投影坐标转换为3D坐标
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 投影坐标点 |
output | Vector3 | 3D坐标点 |
Returns
boolean
Defined in
src/engine/math/Matrix4.ts:385
perspective
▸ perspective(fov
, aspect
, zn
, zf
): void
Language
zh_CN 生成一个透视投影矩阵.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
fov | number | 观察时y 轴方向的角度,就是观察范围夹角。 |
aspect | number | 横纵比,在视空间宽度除以高度. |
zn | number | 近裁剪面位置Z值. |
zf | number | 远裁剪面位置Z值. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:468
ortho
▸ ortho(w
, h
, zn
, zf
): void
Language
zh_CN 生成一个透视投影矩阵.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
w | number | 屏幕的宽度。 |
h | number | 屏幕的高度. |
zn | number | 近裁剪面位置Z值. |
zf | number | 远裁剪面位置Z值. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:506
orthoZO
▸ orthoZO(left
, right
, bottom
, top
, near
, far
): Matrix4
计算一个正交投影矩阵。
Parameters
Name | Type | Description |
---|---|---|
left | number | 视图的左边界 |
right | number | 视图的右边界 |
bottom | number | 视图的下边界 |
top | number | 视图的左上界 |
near | number | 近截面 |
far | number | 远截面 |
Returns
结果矩阵
Defined in
src/engine/math/Matrix4.ts:540
orthoOffCenter
▸ orthoOffCenter(l
, r
, b
, t
, zn
, zf
): void
Language
zh_CN 生成一个透视投影矩阵.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
l | number | 观察时X轴最小值. |
r | number | 观察时X轴最大值. |
b | number | 观察时Y轴最小值。 |
t | number | 观察时Y轴最大值. |
zn | number | 近裁剪面位置Z值. |
zf | number | 远裁剪面位置Z值. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:576
transformDir
▸ transformDir(fromDirection
, toDirection
): void
Language
zh_CN 计算出一个方向变换到另一个方向的旋转矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
fromDirection | Vector3 | 初始方向 |
toDirection | Vector3 | 变换后的方向 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:608
fromToRotation
▸ Static
fromToRotation(fromDirection
, toDirection
, target?
): Matrix4
Language
zh_CN 计算出一个方向变换到另一个方向的旋转矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
fromDirection | Vector3 | 初始方向 |
toDirection | Vector3 | 变换后的方向 |
target? | Matrix4 | 计算出的旋转矩阵 默认为null 结果会返回 |
Returns
Matrix4 计算出的旋转矩阵 如果 target为null 就会创建新实例返回
Defined in
src/engine/math/Matrix4.ts:713
append
▸ append(lhs
): void
Language
zh_CN 通过将当前 Matrix4 对象与另一个 Matrix4 对象相乘来前置一个矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
lhs | Matrix4 | 目标矩阵. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:729
add
▸ add(lhs
): Matrix4
Language
zh_CN 矩阵相加.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
lhs | Matrix4 | 目标矩阵. |
Returns
Matrix4 相加后的结果.
Defined in
src/engine/math/Matrix4.ts:777
sub
▸ sub(lhs
): Matrix4
Language
zh_CN 矩阵相减.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
lhs | Matrix4 | 目标矩阵. |
Returns
Matrix4 相加减的结果.
Defined in
src/engine/math/Matrix4.ts:842
mult
▸ mult(v
): Matrix4
Language
zh_CN 矩阵乘分量.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
v | number | 该矩阵会乘以这个值 |
Returns
Matrix4 返回一个相乘后的结果 矩阵.
Defined in
src/engine/math/Matrix4.ts:908
appendRotation
▸ appendRotation(degrees
, axis
): void
Language
zh_CN 给当前矩阵追加一个方向角旋转 (按axis轴旋转degrees角度创建出来的矩阵)
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
degrees | number | 旋转角度. |
axis | Vector3 | 绕axis轴旋转角度 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:958
createByRotation
▸ createByRotation(degrees
, axis
): void
Language
zh_CN 根据坐标轴和旋转角,创建矩阵 (按axis轴旋转degrees角度创建出来的矩阵)
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
degrees | number | 旋转角度. |
axis | Vector3 | 绕axis轴旋转角度.axis需要指定为x/y/z之间的一个轴的朝向 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:971
appendScale
▸ appendScale(xScale
, yScale
, zScale
): void
Language
zh_CN 追加三轴缩放值
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
xScale | number | x轴缩放 |
yScale | number | y轴缩放 |
zScale | number | z轴缩放 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1048
createByScale
▸ createByScale(xScale
, yScale
, zScale
): void
Language
zh_CN 生成一个缩放矩阵,其他的属性会被重置
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
xScale | number | x轴缩放 |
yScale | number | y轴缩放 |
zScale | number | z轴缩放 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1062
appendTranslation
▸ appendTranslation(x
, y
, z
): void
Language
zh_CN 加上一个平移矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
x | number | x轴坐标 |
y | number | y轴坐标 |
z | number | z轴坐标 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1091
clone
▸ clone(): Matrix4
Language
zh_CN 返回一个当前矩阵的克隆矩阵
Version
UU3D 3.0
Platform
Web,Native
Returns
Matrix4 克隆后的矩阵
Defined in
src/engine/math/Matrix4.ts:1105
copyRowFrom
▸ copyRowFrom(row
, Vector3
): void
Language
zh_CN 给当前矩阵其中一行赋值
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
row | number | 拷贝的行 |
Vector3 | Vector3 | 拷贝的值 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1119
copyRowTo
▸ copyRowTo(row
, Vector3
): void
Language
zh_CN 拷贝矩阵中的其中一行 把值存在Vector3.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
row | number | 拷贝的行 |
Vector3 | Vector3 | 拷贝存值目标 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1159
copyFrom
▸ copyFrom(sourceMatrix3D
): Matrix4
Language
zh_CN 把一个矩阵的值赋给当前矩阵.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
sourceMatrix3D | Matrix4 | 源矩阵. |
Returns
返回当前矩阵
Defined in
src/engine/math/Matrix4.ts:1199
copyRawDataTo
▸ copyRawDataTo(vector
, index?
, transpose?
): void
Language
zh_CN 把当前矩阵的值拷贝给一个 float 数组.
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Default value | Description |
---|---|---|---|
vector | Float32Array | undefined | 目标数组. |
index | number | 0 | 从数组的index 开始copy. |
transpose | boolean | false | 是否转置当前矩阵. |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1229
copyColFrom
▸ copyColFrom(col
, Vector3
): void
Language
zh_CN 给当前矩阵的某一列 赋值
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
col | number | 列 |
Vector3 | Vector3 | 值来源 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1257
copyColTo
▸ copyColTo(col
, Vector3
): void
Language
zh_CN 拷贝当前矩阵的某一列
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
col | number | 列 |
Vector3 | Vector3 | 拷贝目标 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1297
copyToMatrix3D
▸ copyToMatrix3D(dest
): void
Language
zh_CN 拷贝当前矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
dest | Matrix4 | 拷贝目标 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1336
makeRotationFromQuaternion
▸ makeRotationFromQuaternion(quaternion
): Matrix4
计算旋转矩阵
Parameters
Name | Type | Description |
---|---|---|
quaternion | Quaternion | 旋转 |
Returns
Defined in
src/engine/math/Matrix4.ts:1348
decompose
▸ decompose(orientationStyle?
, target?
): Vector3
[]
Language
zh_CN 分解当前矩阵
See
- fly.Orientation3D.AXIS_ANGLE
- fly.Orientation3D.EULER_ANGLES
- fly.Orientation3D.QUATERNION
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Default value | Description |
---|---|---|---|
orientationStyle | string | 'eulerAngles' | 分解类型 默认为 Orientation3D.EULER_ANGLES |
target? | Vector3 [] | undefined | - |
Returns
Vector3
[]
Vector3[3] pos rot scale
Defined in
src/engine/math/Matrix4.ts:1466
getEuler
▸ Static
getEuler(target
, quaternion
, isDegree?
, order?
): Vector3
获取欧拉向量
Parameters
Name | Type | Default value | Description |
---|---|---|---|
target | Vector3 | undefined | 结果向量 |
quaternion | Quaternion | undefined | 旋转 |
isDegree | boolean | true | 是否转换为角度 |
order? | string | undefined | 转换顺序 |
Returns
Defined in
src/engine/math/Matrix4.ts:1590
compose
▸ compose(position
, quaternion
, scale
): Matrix4
计算位移、旋转、缩放组合矩阵
Parameters
Name | Type | Description |
---|---|---|
position | Vector3 | 位移 |
quaternion | Quaternion | 旋转 |
scale | Vector3 | 缩放 |
Returns
Defined in
src/engine/math/Matrix4.ts:1603
deltaTransformVector
▸ deltaTransformVector(v
, target?
): Vector3
Language
zh_CN 当前矩阵变换一个向量
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 要变换的向量 |
target? | Vector3 | 默认为 null 如果当前参数为null那么就会new一个新的Vector3返回 |
Returns
Vector3 变换后的向量
Defined in
src/engine/math/Matrix4.ts:1659
identity
▸ identity(): Matrix4
Language
zh_CN 单位化当前矩阵
Version
UU3D 3.0
Platform
Web,Native
Returns
Defined in
src/engine/math/Matrix4.ts:1681
fill
▸ fill(value
): void
Language
zh_CN 填充当前矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
value | number | 填充的值 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:1710
invers33
▸ invers33(): void
Language
zh_CN 当前矩阵求逆
Version
UU3D 3.0
Platform
Web,Native
Returns
void
Defined in
src/engine/math/Matrix4.ts:1736
invert
▸ invert(): boolean
Language
zh_CN 当前矩阵求逆
Version
UU3D 3.0
Platform
Web,Native
Returns
boolean
boolean 是否能求逆
Defined in
src/engine/math/Matrix4.ts:1834
transformPoint
▸ transformPoint(v
, target?
): Vector3
将当前坐标转换为世界坐标
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 当前坐标 |
target? | Vector3 | 世界坐标 |
Returns
世界坐标
Defined in
src/engine/math/Matrix4.ts:1993
transformVector
▸ transformVector(v
, target?
): Vector3
Language
zh_CN 用当前矩阵变换一个3D向量 不处理位移
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
v | Vector3 | 变换的向量 |
target? | Vector3 | 如果当前参数为null那么就会new一个新的Vector3返回 |
Returns
Vector3 变换后的向量
Defined in
src/engine/math/Matrix4.ts:2020
transpose
▸ transpose(): void
Language
zh_CN 当前矩阵转置
Version
UU3D 3.0
Platform
Web,Native
Returns
void
Defined in
src/engine/math/Matrix4.ts:2044
getAxisRotation
▸ Static
getAxisRotation(x
, y
, z
, degrees
): Matrix4
Language
zh_CN 生成一个(以x,y,z为中心轴旋转degrees角度)的矩阵
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
x | number | 中心轴的x |
y | number | 中心轴的y |
z | number | 中心轴的z |
degrees | number | 旋转角度 |
Returns
Matrix4 矩阵
Defined in
src/engine/math/Matrix4.ts:2076
getPosition
▸ getPosition(out?
): Vector3
返回矩阵位移
Parameters
Name | Type | Description |
---|---|---|
out? | Vector3 | 位移 |
Returns
位移
Defined in
src/engine/math/Matrix4.ts:2129
toString
▸ toString(): string
Language
zh_CN 以字符串返回矩阵的值
Version
UU3D 3.0
Platform
Web,Native
Returns
string
string 字符
Defined in
src/engine/math/Matrix4.ts:2203
lerp
▸ lerp(m0
, m1
, t
): void
Language
zh_CN 求两个矩阵之间的插值
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
m0 | Matrix4 | 矩阵0 |
m1 | Matrix4 | 矩阵1 |
t | number | 时间差 0.0 - 1.0 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2251
get
▸ get(row
, column
): number
读取矩阵元素值
Parameters
Name | Type | Description |
---|---|---|
row | number | 行 |
column | number | 列 |
Returns
number
Defined in
src/engine/math/Matrix4.ts:2262
set
▸ set(row
, column
, v
): void
设置矩阵元素值
Parameters
Name | Type | Description |
---|---|---|
row | number | 行 |
column | number | 列 |
v | number | 值 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2272
getMaxScaleOnAxis
▸ getMaxScaleOnAxis(): number
Language
zh_CN 求矩阵在各个轴上缩放的最大值
Version
UU3D 4.0
Platform
Web,Native
Returns
number
Defined in
src/engine/math/Matrix4.ts:2282
sanitizeEuler
▸ Static
sanitizeEuler(euler
): void
整理欧拉值
Parameters
Name | Type | Description |
---|---|---|
euler | Vector3 | 待整理区拉值 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2296
makePositive
▸ Static
makePositive(euler
): void
Parameters
Name | Type |
---|---|
euler | Vector3 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2304
matrixToEuler
▸ Static
matrixToEuler(matrix
, v
): boolean
将矩阵转换为欧拉角
Parameters
Name | Type | Description |
---|---|---|
matrix | Matrix4 | 待转换矩阵 |
v | Vector3 | 欧拉角 |
Returns
boolean
Defined in
src/engine/math/Matrix4.ts:2324
translate
▸ translate(inTrans
): Matrix4
根据向量计算位移
Parameters
Name | Type | Description |
---|---|---|
inTrans | Vector3 | 需要位移的向量 |
Returns
当前矩阵
Defined in
src/engine/math/Matrix4.ts:2360
setTRInverse
▸ setTRInverse(pos
, q
): void
form unity API
Parameters
Name | Type |
---|---|
pos | Vector3 |
q | Quaternion |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2378
setScale
▸ setScale(inScale
): Matrix4
缩放
Parameters
Name | Type | Description |
---|---|---|
inScale | Vector3 | 缩放向量 |
Returns
当前矩阵
Defined in
src/engine/math/Matrix4.ts:2389
matrix_Multiply
▸ Static
matrix_Multiply(aMat
, bMat
, target_Mat
): void
世界矩阵间相乘,根据索引指定参数与结果
Parameters
Name | Type | Description |
---|---|---|
aMat | Matrix4 | 待乘矩阵(请指定索引) |
bMat | Matrix4 | 待乘矩阵(请指定索引) |
target_Mat | Matrix4 | 结果矩阵(根据索引获取结果) |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2418
matrix_Append
▸ Static
matrix_Append(aMat
, bMat
, target_Mat
): void
世界矩阵间伸展,根据索引指定参数与结果
Parameters
Name | Type | Description |
---|---|---|
aMat | Matrix4 | 待乘矩阵(请指定索引) |
bMat | Matrix4 | 待乘矩阵(请指定索引) |
target_Mat | Matrix4 | 结果矩阵(根据索引获取结果) |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2428
matrix_RotateY
▸ Static
matrix_RotateY(rad
, target_Mat
): void
世界矩阵间延Y轴旋转,根据索引指定参数与结果
Parameters
Name | Type | Description |
---|---|---|
rad | number | - |
target_Mat | Matrix4 | 结果矩阵(根据索引获取结果) |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2438
matrix_Rotate
▸ Static
matrix_Rotate(rad
, axis
, target_Mat
): void
世界矩阵间旋转,根据索引指定参数与结果
Parameters
Name | Type | Description |
---|---|---|
rad | number | - |
axis | Vector3 | - |
target_Mat | Matrix4 | 结果矩阵(根据索引获取结果) |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2448
makeBasis
▸ makeBasis(xAxis
, yAxis
, zAxis
): Matrix4
根据三轴生成矩阵
Parameters
Name | Type |
---|---|
xAxis | Vector3 |
yAxis | Vector3 |
zAxis | Vector3 |
Returns
Defined in
src/engine/math/Matrix4.ts:2458
setElements
▸ setElements(n11
, n12
, n13
, n14
, n21
, n22
, n23
, n24
, n31
, n32
, n33
, n34
, n41
, n42
, n43
, n44
): Matrix4
Parameters
Name | Type |
---|---|
n11 | any |
n12 | any |
n13 | any |
n14 | any |
n21 | any |
n22 | any |
n23 | any |
n24 | any |
n31 | any |
n32 | any |
n33 | any |
n34 | any |
n41 | any |
n42 | any |
n43 | any |
n44 | any |
Returns
Defined in
src/engine/math/Matrix4.ts:2469
makeRotationAxis
▸ makeRotationAxis(axis
, angle
): Matrix4
Parameters
Name | Type |
---|---|
axis | any |
angle | any |
Returns
Defined in
src/engine/math/Matrix4.ts:2482
Constructors
constructor
• new Matrix4(noWasm?
)
构造函数,创建一个矩阵实例
Language
zh_CN
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Default value |
---|---|---|
noWasm | boolean | true |
Defined in
src/engine/math/Matrix4.ts:142
Accessors
determinant
• get
determinant(): number
Language
zh_CN 返回矩阵行列式
Version
UU3D 3.0
Platform
Web,Native
Returns
number
number 行列式值
Defined in
src/engine/math/Matrix4.ts:2112
position
• get
position(): Vector3
Language
zh_CN 返回矩阵位移
Version
UU3D 3.0
Platform
Web,Native
Returns
Vector3 位移
Defined in
src/engine/math/Matrix4.ts:2148
• set
position(value
): void
Language
zh_CN 设置矩阵位移
Version
UU3D 3.0
Platform
Web,Native
Parameters
Name | Type | Description |
---|---|---|
value | Vector3 | 位移 |
Returns
void
Defined in
src/engine/math/Matrix4.ts:2161
scale
• get
scale(): Vector3
Language
zh_CN 返回矩阵缩放
Version
UU3D 3.0
Platform
Web,Native
Returns
Vector3 缩放
Defined in
src/engine/math/Matrix4.ts:2176
• set
scale(value
): void
设置矩阵缩放
Parameters
Name | Type |
---|---|
value | Vector3 |
Returns
void