March 2017
Intermediate to advanced
480 pages
11h 3m
English
The scale of a matrix is stored in the main diagonal of the matrix. The scale is stored as a vec3. Each element of the vec3 represents the scale on the corresponding axis. Row and Column major matrices store scale information in the same elements:

The interesting thing with storing scale inside a matrix is that it shares some of the same elements as the rotation part of the matrix. Because of this, extracting the scale of a matrix may not always yield the numbers you would expect.
We're going to implement three functions. One function will retrieve the scale stored inside a matrix. The other two will return a new matrix, containing ...
Read now
Unlock full access