Game Development Reference
In-Depth Information
data[6] = ([4]*[2][0]*[6]*[15])*det;
data[10] = ([4]*[1][0]*[5]*[15])*det;
data[3] = ([9]*[6]*[3][5]*[10]*[3][9]*[2]*[7][1]*[10]*[7][5]*[2]*[11][1]*[6]*[11])*det;
data[7] = ([8]*[6]*[3][4]*[10]*[3][8]*[2]*[7][0]*[10]*[7][4]*[2]*[11][0]*[6]*[11])*det;
data[11] =([8]*[5]*[3][4]*[9]*[3][8]*[1]*[7][0]*[9]*[7][4]*[1]*[11][0]*[5]*[11])*det;
You'll notice from this code that the inverse again exists only when the determinant
of the matrix is non-zero.
The Matrix Transpose
Whenever the determinant is non-zero, we can always use the preceding equations to
find the inverse of a matrix. It is not the simplest process, however, and in some cases
we can do much better.
If we have a matrix that represents a rotation only, we can make use of the fact
that the inverse of the transformation is another rotation, about the same axis but
at the opposite angle. This is equivalent to inverting the axis and using the same an-
gle. We can create a matrix that rotates the same degree in the opposite direction by
transposing the original matrix.
The transpose of a matrix
Search Nedrilad ::

Custom Search