getMatrix3

fun getMatrix3(matrix: Matrix4, result: Matrix3): Matrix3(source)

Gets the upper left 3x3 matrix of the provided matrix.

// returns a Matrix3 instance from a Matrix4 instance

// m = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]

const b = new Matrix3();
Matrix4.getMatrix3(m,b);

// b = [10.0, 14.0, 18.0]
// [11.0, 15.0, 19.0]
// [12.0, 16.0, 20.0]

Return

The modified result parameter.

Parameters

matrix

The matrix to use.

result

The object onto which to store the result.

See also