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
  • mul Multiply the current matrix with another one
  • mulScalar Multiply each element of the matrix by a scalar.
  • sub Subtracts the current matrix with another one
  • 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:86
m

Matrix Data

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

Methods

mul

Multiply the current matrix with another one

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:52
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
mulScalar

Multiply each element of the matrix by a scalar.

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:63
Parameters
  • number Number amount to scale the matrix's elements 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
sub

Subtracts the current matrix with another one

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:74
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
clone

Copy of the specified matrix to obtain

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

Copy the target matrix

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

The target of an assignment is the identity matrix

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

Transposed matrix

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

Matrix inversion

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

Matrix determinant

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

Matrix Multiplication

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

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

meta description
Defined in cocos2d/core/value-types/mat4.ts:364
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:398
scale

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

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

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

meta description
Defined in cocos2d/core/value-types/mat4.ts:454
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:518
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:564
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:610
Parameters
  • rad Unknown 旋转角度
fromTranslation

Displacement matrix calculation

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

Scaling matrix calculation

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

Calculates the rotation matrix

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

Calculating rotation matrix about the X axis

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

Calculating rotation matrix about the Y axis

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

Calculating rotation matrix about the Z axis

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

The rotation and displacement information calculating matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:858
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:903
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:920
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:948
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:990
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:1019
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:1067
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:1124
frustum

The matrix calculation information specified frustum

meta description
Defined in cocos2d/core/value-types/mat4.ts:1172
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:1211
Parameters
  • fovy Unknown 纵向视角高度
  • aspect Unknown 长宽比
  • near Unknown 近平面距离
  • far Unknown 远平面距离
ortho

Computing orthogonal projection matrix

meta description
Defined in cocos2d/core/value-types/mat4.ts:1247
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:1285
Parameters
  • eye Unknown 当前位置
  • center Unknown 目标视点
  • up Unknown 视口上方向
inverseTranspose

Reversal matrix calculation

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

Element by element matrix addition

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

Matrix element by element subtraction

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

Matrix scalar multiplication

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

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

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

Analyzing the equivalent matrix

meta description
Returns Bool
Defined in cocos2d/core/value-types/mat4.ts:1526
equals

Negative floating point error is approximately equivalent to determining a matrix

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

Matrix transpose array

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

Transfer matrix array

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

Constructor see cc.mat4

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

clone a Mat4 object

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

Sets the matrix with another one's value

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

Check whether two matrix equal

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

Check whether two matrix equal with default degree of variance.

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

Transform to string with matrix informations

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

Set the matrix to the identity matrix

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

Transpose the values of a mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1794
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:1805
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:1816
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:1827
add

Adds two Mat4

meta description
Returns Mat4
Defined in cocos2d/core/value-types/mat4.ts:1836
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:1848
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:1858
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:1868
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:1878
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:1890
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:1902
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:1915
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:1926
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:1937
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:1948
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:1961
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 ""