The meaning of the matrix values

In the next image, the model has been rotated around its y axis by 30 degrees. The panel on the left shows the new values of its matrix.

The Matrix class stores the matrix as an array: m!(0 to 15). The panel shows the array as 4 column vectors.

In the array, elements 12, 13, 14 are the x,y,z translation values. In this case, the model's values are 0,0,0 and the cameras are 0,0,5.

The first 3 columns of the matrix describe the axes of the models local coordinate space. If you imagine that the axes are one unit long each (they are actually 2 so that they will be easier to see), then the elements 0,1,2 are the coordinates of the red ball, 4,5,6 are those of the green ball, and 8,9,10 are those of the blue ball. These values are the unit vectors which define the x,y,z axes, in this case:

x – (.866,0,-.5)

y – (0,1,0)

z – (.5,0,.866)

Scaling and rotation affects the upper left 3x3 submatrix. After scaling, the column vectors are no longer of unit length.

That's it. You can check the links below for discussions from people with more expertise.

Загрузка...