Class: Matrix44

SQR.Matrix44()

new Matrix44()

A multi-purpose 4x4 matrix.

Source:

Methods

rotate(rx, ry, rz)

Applies rotation to matrix

Parameters:
Name Type Description
rx

angle in radians of the rotation on x axis

ry

angle in radians of the rotation on y axis

rz

angle in radians of the rotation on z axis

Source:

scale(sx, sy, sz)

Applies scale to matrix

Parameters:
Name Type Description
sx

x scale

sy

y scale

sz

z scale

Source:

setRotation(rx, ry, rz, m)

Sets the rotation value.

Parameters:
Name Type Description
rx

angle in radians of the rotation on x axis

ry

angle in radians of the rotation on y axis

rz

angle in radians of the rotation on z axis

m

the matrix to set rotation to, applies to this if ommited

Source:

setScale(sx, sy, sz, m)

Sets the scale values.

Parameters:
Name Type Description
sx

x scale

sy

y scale

sz

z scale

m

the matrix to set scale to, applies to this if ommited

Source:

setTQS(tx, ty, tz, qw, qx, qx, qx, sx, sy, sz, m)

Sets the translation/rotation/scale values at once. Similar to setTRS but the rotation is defined as a quaternion.

Parameters:
Name Type Description
tx

x translation

ty

y translation

tz

y translation

qw

w compoment of the quaternion

qx

x compoment of the quaternion

qx

y compoment of the quaternion

qx

z compoment of the quaternion

sx

x scale

sy

y scale

sz

z scale

m

the matrix to set scale to, applies to this if ommited

Source:

setTranslation(tx, ty, tz, m)

Sets the translation values.

Parameters:
Name Type Description
tx

x translation

ty

y translation

tz

z translation

m

the matrix to set translation to, applies to this if ommited

Source:

setTRS(tx, ty, tz, rx, ry, rz, sx, sy, sz, m)

Sets the translation/rotation/scale values at once.

Parameters:
Name Type Description
tx

x translation

ty

y translation

tz

y translation

rx

rotation angle in radians on the x axis

ry

rotation angle in radians on the y axis

rz

rotation angle in radians on the z axis

sx

x scale

sy

y scale

sz

z scale

m

the matrix to set scale to, applies to this if ommited

Source:

translate(tx, ty, tz)

Applies translation to matrix

Parameters:
Name Type Description
tx

x translation

ty

y translation

tz

z translation

Source: