Camera Matrix Is the Inverse of the Model-View Matrix

These two scenarios help us appreciate that a Camera matrix is the exact opposite of the Model-View matrix. In linear algebra, this property is known as the inverse of a matrix.

The inverse of a matrix is such that when multiplying it by the original matrix, we obtain the Identity matrix. In other words, if M is the Model-View matrix and C is the Camera matrix, we get the following:

We can create the Camera matrix using glMatrix by writing something like the following:

const cameraMatrix = mat4.create();
mat4.invert(cameraMatrix, modelViewMatrix);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.97.64