multiplyByMatrix3

fun multiplyByMatrix3(matrix: Matrix4, rotation: Matrix3, result: Matrix4): Matrix4(source)

Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]) by a 3x3 rotation matrix. This is an optimization for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m); with less allocations and arithmetic operations.

// Instead of Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);
Matrix4.multiplyByMatrix3(m, rotation, m);

Return

The modified result parameter.

Parameters

matrix

The matrix on the left-hand side.

rotation

The 3x3 rotation matrix on the right-hand side.

result

The object onto which to store the result.

See also