getNormalMatrix method

Matrix3 getNormalMatrix(
  1. Matrix4 matrix4
)

m - Matrix4

Sets this matrix as the upper left 3x3 of the normal matrix of the passed matrix4. The normal matrix is the inverse transpose of the matrix m.

Implementation

Matrix3 getNormalMatrix(Matrix4 matrix4) {
  return setFromMatrix4(matrix4).invert().transpose();
}