Mat4 Class

Extends ValueType

Module: cc Parent Module: cc

Representation of 4*4 matrix.

Index

Properties
  • IDENTITY Mat4 Identity of Mat4
  • m Float64Array | Float32Array Matrix Data
Methods
  • clone Copy of the specified matrix to obtain
  • copy Copy the target matrix
  • identity The target of an assignment is the identity matrix
  • transpose Transposed matrix
  • invert Matrix inversion
  • determinant Matrix determinant
  • multiply Matrix Multiplication
  • transform Was added in a given transformation matrix transformation on the basis of
  • translate Add new displacement transducer in a matrix transformation on the basis of a given
  • scale Add new scaling transformation in a given matrix transformation on the basis of
  • rotate Add a new rotational transform matrix transformation on the basis of a given
  • rotateX Add rotational transformation around the X axis at a given matrix transformation on the basis of
  • rotateY Add about the Y axis rotation transformation in a given matrix transformation on the basis of
  • rotateZ Added about the Z axis at a given rotational transformation matrix transformation on the basis of
  • fromTranslation Displacement matrix calculation
  • fromScaling Scaling matrix calculation
  • fromRotation Calculates the rotation matrix
  • fromXRotation Calculating rotation matrix about the X axis
  • fromYRotation Calculating rotation matrix about the Y axis
  • fromZRotation Calculating rotation matrix about the Z axis
  • fromRT The rotation and displacement information calculating matrix
  • getTranslation Extracting displacement information of the matrix, the matrix transform to the default sequential application S-> R-> T is
  • getScaling Scaling information extraction matrix, the matrix transform to the default sequential application S-> R-> T is
  • getRotation Rotation information extraction matrix, the matrix containing no default input scaling information, such as the use of toRTS should consider the scaling function.
  • toRTS Extracting rotational displacement, zoom information, the default matrix transformation in order S-> R-> T applications
  • fromRTS The rotary displacement, the scaling matrix calculation information, the order S-> R-> T applications
  • fromRTSOrigin According to the specified rotation, displacement, and scale conversion matrix calculation information center, order S-> R-> T applications
  • fromQuat The rotation matrix calculation information specified
  • frustum The matrix calculation information specified frustum
  • perspective Perspective projection matrix calculation
  • ortho Computing orthogonal projection matrix
  • lookAt Up parallel vector or vector centernot be zero - the matrix calculation according to the viewpoint, note eye
  • inverseTranspose Reversal matrix calculation
  • add Element by element matrix addition
  • subtract Matrix element by element subtraction
  • multiplyScalar Matrix scalar multiplication
  • multiplyScalarAndAdd Elements of the matrix by the scalar multiplication and addition: A + B * scale
  • strictEquals Analyzing the equivalent matrix
  • equals Negative floating point error is approximately equivalent to determining a matrix
  • toArray Matrix transpose array
  • fromArray Transfer matrix array
  • constructor Constructor
  • clone clone a Mat4 object
  • set Sets the matrix with another one's value
  • equals Check whether two matrix equal
  • fuzzyEquals Check whether two matrix equal with default degree of variance.
  • toString Transform to string with matrix informations
  • identity Set the matrix to the identity matrix
  • transpose Transpose the values of a mat4
  • invert Inverts a mat4
  • adjoint Calculates the adjugate of a mat4
  • determinant Calculates the determinant of a mat4
  • add Adds two Mat4
  • subtract Subtracts the current matrix with another one
  • multiply Subtracts the current matrix with another one
  • multiplyScalar Multiply each element of the matrix by a scalar.
  • translate Translate a mat4 by the given vector
  • scale Scales the mat4 by the dimensions in the given vec3
  • rotate Rotates a mat4 by the given angle around the given axis
  • getTranslation Returns the translation vector component of a transformation matrix.
  • getScale Returns the scale factor component of a transformation matrix
  • getRotation Returns the rotation factor component of a transformation matrix
  • fromRTS Restore the matrix values from a quaternion rotation, vector translation and vector scale
  • fromQuat Restore the matrix values from a quaternion rotation
  • lerp Linearly interpolates between this value to to value by ratio which is in the range [0, 1].

Details

Properties

IDENTITY

Identity of Mat4

meta description
Type Mat4
Defined in cocos2d/core/value-types/mat4.ts:62
m

Matrix Data

meta description
Type Float64Array | Float32Array
Defined in cocos2d/core/value-types/mat4.ts:1616

Methods

clone

Copy of the specified matrix to obtain

meta description
Defined in cocos2d/core/value-types/mat4.ts:69
copy

Copy the target matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:87
identity

The target of an assignment is the identity matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:136
transpose

Transposed matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:165
invert

Matrix inversion

meta description
Defined in cocos2d/core/value-types/mat4.ts:211
determinant

Matrix determinant

meta description
Defined in cocos2d/core/value-types/mat4.ts:266
multiply

Matrix Multiplication

meta description
Defined in cocos2d/core/value-types/mat4.ts:298
transform

Was added in a given transformation matrix transformation on the basis of

meta description
Defined in cocos2d/core/value-types/mat4.ts:340
translate

Add new displacement transducer in a matrix transformation on the basis of a given

meta description
Defined in cocos2d/core/value-types/mat4.ts:374
scale

Add new scaling transformation in a given matrix transformation on the basis of

meta description
Defined in cocos2d/core/value-types/mat4.ts:400
rotate

Add a new rotational transform matrix transformation on the basis of a given

meta description
Defined in cocos2d/core/value-types/mat4.ts:430
Parameters
  • rad Unknown 旋转角度
  • axis Unknown 旋转轴
rotateX

Add rotational transformation around the X axis at a given matrix transformation on the basis of

meta description
Defined in cocos2d/core/value-types/mat4.ts:494
Parameters
  • rad Unknown 旋转角度
rotateY

Add about the Y axis rotation transformation in a given matrix transformation on the basis of

meta description
Defined in cocos2d/core/value-types/mat4.ts:540
Parameters
  • rad Unknown 旋转角度
rotateZ

Added about the Z axis at a given rotational transformation matrix transformation on the basis of

meta description
Defined in cocos2d/core/value-types/mat4.ts:586
Parameters
  • rad Unknown 旋转角度
fromTranslation

Displacement matrix calculation

meta description
Defined in cocos2d/core/value-types/mat4.ts:634
fromScaling

Scaling matrix calculation

meta description
Defined in cocos2d/core/value-types/mat4.ts:663
fromRotation

Calculates the rotation matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:692
fromXRotation

Calculating rotation matrix about the X axis

meta description
Defined in cocos2d/core/value-types/mat4.ts:738
fromYRotation

Calculating rotation matrix about the Y axis

meta description
Defined in cocos2d/core/value-types/mat4.ts:770
fromZRotation

Calculating rotation matrix about the Z axis

meta description
Defined in cocos2d/core/value-types/mat4.ts:802
fromRT

The rotation and displacement information calculating matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:834
getTranslation

Extracting displacement information of the matrix, the matrix transform to the default sequential application S-> R-> T is

meta description
Defined in cocos2d/core/value-types/mat4.ts:879
getScaling

Scaling information extraction matrix, the matrix transform to the default sequential application S-> R-> T is

meta description
Defined in cocos2d/core/value-types/mat4.ts:896
getRotation

Rotation information extraction matrix, the matrix containing no default input scaling information, such as the use of toRTS should consider the scaling function.

meta description
Defined in cocos2d/core/value-types/mat4.ts:924
toRTS

Extracting rotational displacement, zoom information, the default matrix transformation in order S-> R-> T applications

meta description
Defined in cocos2d/core/value-types/mat4.ts:966
fromRTS

The rotary displacement, the scaling matrix calculation information, the order S-> R-> T applications

meta description
Defined in cocos2d/core/value-types/mat4.ts:995
fromRTSOrigin

According to the specified rotation, displacement, and scale conversion matrix calculation information center, order S-> R-> T applications

meta description
Defined in cocos2d/core/value-types/mat4.ts:1043
Parameters
  • q Unknown 旋转值
  • v Unknown 位移值
  • s Unknown 缩放值
  • o Unknown 指定变换中心
fromQuat

The rotation matrix calculation information specified

meta description
Defined in cocos2d/core/value-types/mat4.ts:1100
frustum

The matrix calculation information specified frustum

meta description
Defined in cocos2d/core/value-types/mat4.ts:1148
Parameters
  • left Unknown 左平面距离
  • right Unknown 右平面距离
  • bottom Unknown 下平面距离
  • top Unknown 上平面距离
  • near Unknown 近平面距离
  • far Unknown 远平面距离
perspective

Perspective projection matrix calculation

meta description
Defined in cocos2d/core/value-types/mat4.ts:1187
Parameters
  • fovy Unknown 纵向视角高度
  • aspect Unknown 长宽比
  • near Unknown 近平面距离
  • far Unknown 远平面距离
ortho

Computing orthogonal projection matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:1223
Parameters
  • left Unknown 左平面距离
  • right Unknown 右平面距离
  • bottom Unknown 下平面距离
  • top Unknown 上平面距离
  • near Unknown 近平面距离
  • far Unknown 远平面距离
lookAt

Up parallel vector or vector centernot be zero - the matrix calculation according to the viewpoint, note eye

meta description
Defined in cocos2d/core/value-types/mat4.ts:1261
Parameters
  • eye Unknown 当前位置
  • center Unknown 目标视点
  • up Unknown 视口上方向
inverseTranspose

Reversal matrix calculation

meta description
Defined in cocos2d/core/value-types/mat4.ts:1325
add

Element by element matrix addition

meta description
Defined in cocos2d/core/value-types/mat4.ts:1386
subtract

Matrix element by element subtraction

meta description
Defined in cocos2d/core/value-types/mat4.ts:1415
multiplyScalar

Matrix scalar multiplication

meta description
Defined in cocos2d/core/value-types/mat4.ts:1444
multiplyScalarAndAdd

Elements of the matrix by the scalar multiplication and addition: A + B * scale

meta description
Defined in cocos2d/core/value-types/mat4.ts:1473
strictEquals

Analyzing the equivalent matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:1502
equals

Negative floating point error is approximately equivalent to determining a matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:1518
toArray

Matrix transpose array

meta description
Defined in cocos2d/core/value-types/mat4.ts:1582
Parameters
  • ofs Unknown 数组内的起始偏移量
fromArray

Transfer matrix array

meta description
Defined in cocos2d/core/value-types/mat4.ts:1599
Parameters
  • ofs Unknown 数组起始偏移量
constructor

Constructor see cc.mat4

meta description
Defined in cocos2d/core/value-types/mat4.ts:1624
clone

clone a Mat4 object

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1669
set

Sets the matrix with another one's value

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1685
Parameters
equals

Check whether two matrix equal

meta description
Returns Boolean
Defined in cocos2d/core/value-types/mat4.ts:1715
Parameters
fuzzyEquals

Check whether two matrix equal with default degree of variance.

meta description
Returns Boolean
Defined in cocos2d/core/value-types/mat4.ts:1726
Parameters
toString

Transform to string with matrix informations

meta description
Returns string
Defined in cocos2d/core/value-types/mat4.ts:1739
identity

Set the matrix to the identity matrix

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1764
transpose

Transpose the values of a mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1774
Parameters
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.
invert

Inverts a mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1785
Parameters
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.
adjoint

Calculates the adjugate of a mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1796
Parameters
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.
determinant

Calculates the determinant of a mat4

meta description
Returns Number
Defined in cocos2d/core/value-types/mat4.ts:1807
add

Adds two Mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1816
Parameters
  • other Mat4 the second operand
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.
subtract

Subtracts the current matrix with another one

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1828
Parameters
  • other Mat4 the second operand
multiply

Subtracts the current matrix with another one

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1838
Parameters
  • other Mat4 the second operand
multiplyScalar

Multiply each element of the matrix by a scalar.

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1848
Parameters
  • number Number amount to scale the matrix's elements by
translate

Translate a mat4 by the given vector

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1858
Parameters
  • v Vec3 vector to translate by
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created
scale

Scales the mat4 by the dimensions in the given vec3

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1870
Parameters
  • v Vec3 vector to scale by
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created
rotate

Rotates a mat4 by the given angle around the given axis

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1882
Parameters
  • rad Number the angle to rotate the matrix by
  • axis Vec3 the axis to rotate around
  • out Mat4 the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created
getTranslation

Returns the translation vector component of a transformation matrix.

meta description
Returns Vec3
Defined in cocos2d/core/value-types/mat4.ts:1895
Parameters
  • out Vec3 Vector to receive translation component, if not provided, a new vec3 will be created
getScale

Returns the scale factor component of a transformation matrix

meta description
Returns Vec3
Defined in cocos2d/core/value-types/mat4.ts:1906
Parameters
  • out Vec3 Vector to receive scale component, if not provided, a new vec3 will be created
getRotation

Returns the rotation factor component of a transformation matrix

meta description
Returns Quat
Defined in cocos2d/core/value-types/mat4.ts:1917
Parameters
  • out Quat Vector to receive rotation component, if not provided, a new quaternion object will be created
fromRTS

Restore the matrix values from a quaternion rotation, vector translation and vector scale

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1928
Parameters
  • q Quat Rotation quaternion
  • v Vec3 Translation vector
  • s Vec3 Scaling vector
fromQuat

Restore the matrix values from a quaternion rotation

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1941
Parameters
  • q Quat Rotation quaternion
lerp

Linearly interpolates between this value to to value by ratio which is in the range [0, 1]. When ratio = 0 returns this. When ratio = 1 return to. When ratio = 0.5 returns the average of this and to.

meta description
Returns ValueType
Defined in cocos2d/core/value-types/value-type.ts:63
Parameters

results matching ""

    No results matching ""