The Model-View Matrix

The Model-View matrix allows us to perform affine transformations in our scene. Affine is a mathematical name that describes transformations that do not change the structure of the object undergoing such transformations. In our 3D world scene, such transformations are rotation, scaling, reflection shearing, and translation. Fortunately, we do not need to understand how to represent such transformations with matrices. We just need to use one of the many JavaScript matrix libraries that are available online (such as glMatrix).

Affine Transformations

You can find more information on how transformation matrices work at https://en.wikipedia.org/wiki/Affine_transformation.

Understanding the structure of the Model-View matrix will not help you if you just want to apply transformations to the scene or to objects in the scene. For that effect, simply use a library, such as glMatrix, to do the transformations on your behalf. However, the structure of this matrix could be invaluable information when you are trying to troubleshoot your 3D application. Let's take a look at how the Model-View matrix is constructed.

..................Content has been hidden....................

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