@simversus/yjvis • Docs
@simversus/yjvis / Mat4
Class: Mat4
Constructors
new Mat4()
new Mat4(
m00
,m01
,m02
,m03
,m10
,m11
,m12
,m13
,m20
,m21
,m22
,m23
,m30
,m31
,m32
,m33
):Mat4
Parameters
• m00: number
= 1
• m01: number
= 0
• m02: number
= 0
• m03: number
= 0
• m10: number
= 0
• m11: number
= 1
• m12: number
= 0
• m13: number
= 0
• m20: number
= 0
• m21: number
= 0
• m22: number
= 1
• m23: number
= 0
• m30: number
= 0
• m31: number
= 0
• m32: number
= 0
• m33: number
= 1
Returns
Defined in
math/mat4.ts:18
Properties
elements
elements:
Number16
Defined in
math/mat4.ts:16
Methods
clone()
clone():
Mat4
返回一份副本
Returns
Defined in
math/mat4.ts:154
compose()
compose(
position
,quaternion
,scale
):Mat4
Parameters
• position: Vec3
• quaternion: Quat
• scale: Vec3
Returns
Defined in
math/mat4.ts:229
copy()
copy(
m
):Mat4
从其它矩阵复制
Parameters
• m: Mat4
Returns
Defined in
math/mat4.ts:145
decompose()
decompose(
position
,quaternion
,scale
):Mat4
Parameters
• position: Vec3
• quaternion: Quat
• scale: Vec3
Returns
Defined in
math/mat4.ts:276
determinant()
determinant():
number
计算行列式,为0表示不可逆
Returns
number
Defined in
math/mat4.ts:394
fromDirectionA2B()
fromDirectionA2B(
a
,b
):Mat4
Parameters
• a: Vec3
• b: Vec3
Returns
Defined in
math/mat4.ts:199
fromOrthogonal()
fromOrthogonal(
left
,right
,bottom
,top
,near
,far
,isHalfZ
):Mat4
Parameters
• left: number
• right: number
• bottom: number
• top: number
• near: number
• far: number
• isHalfZ: boolean
Returns
Defined in
math/mat4.ts:166
fromPerspective()
fromPerspective(
fov
,aspect
,near
,far
,isHalfZ
):Mat4
Parameters
• fov: number
• aspect: number
• near: number
• far: number
• isHalfZ: boolean
Returns
Defined in
math/mat4.ts:160
fromQuaternion()
fromQuaternion(
q
):Mat4
Parameters
• q: Quat
Returns
Defined in
math/mat4.ts:180
fromScaling()
fromScaling(
v
):Mat4
Parameters
• v: Vec3
Returns
Defined in
math/mat4.ts:190
fromTranslation()
fromTranslation(
v
):Mat4
Parameters
• v: Vec3
Returns
Defined in
math/mat4.ts:185
getDirection()
getDirection(
v
):Vec3
获取矩阵的z朝向
Parameters
• v: Vec3
= ...
Returns
Defined in
math/mat4.ts:341
getRotation()
getRotation(
v
):Quat
Parameters
• v: Quat
= ...
Returns
Defined in
math/mat4.ts:326
getScaling()
getScaling(
v
):Vec3
Parameters
• v: Vec3
= ...
Returns
Defined in
math/mat4.ts:331
getTranslation()
getTranslation(
v
):Vec3
Parameters
• v: Vec3
= ...
Returns
Defined in
math/mat4.ts:321
identity()
identity():
Mat4
Returns
Defined in
math/mat4.ts:135
inverse()
inverse(
m
):Mat4
逆矩阵
Parameters
• m: Mat4
= ...
Returns
Defined in
math/mat4.ts:219
log()
log(
label
):void
Parameters
• label: string
= ''
Returns
void
Defined in
math/mat4.ts:90
lookAt()
lookAt(
eye
,target
,up
):Mat4
Parameters
• eye: Vec3
• target: Vec3
• up: Vec3
Returns
Defined in
math/mat4.ts:351
multiply()
multiply(
ma
,mb
?):Mat4
Parameters
• ma: Mat4
• mb?: Mat4
Returns
Defined in
math/mat4.ts:126
rotate()
rotate(
radian
,axis
,m
):Mat4
Parameters
• radian: number
• axis: Vec3
• m: Mat4
= ...
Returns
Defined in
math/mat4.ts:116
scale()
scale(
v
,m
):Mat4
Parameters
• v: Vec3
• m: Mat4
= ...
Returns
Defined in
math/mat4.ts:121
set()
set(
m00
,m01
,m02
,m03
,m10
,m11
,m12
,m13
,m20
,m21
,m22
,m23
,m30
,m31
,m32
,m33
):Mat4
按列优先
Parameters
• m00: number
• m01: number
• m02: number
• m03: number
• m10: number
• m11: number
• m12: number
• m13: number
• m20: number
• m21: number
• m22: number
• m23: number
• m30: number
• m31: number
• m32: number
• m33: number
Returns
Defined in
math/mat4.ts:43
setPosition()
setPosition(
x
,y
,z
):Mat4
Parameters
• x: number
= 0
• y: number
= 0
• z: number
= 0
Returns
Defined in
math/mat4.ts:109
translate()
translate(
v
,m
):Mat4
Parameters
• v: Vec3
• m: Number16
= ...
Returns
Defined in
math/mat4.ts:104
transpose()
transpose(
m
):Mat4
Parameters
• m: Mat4
= ...
Returns
Defined in
math/mat4.ts:224