Removed the use of register hint and cleaned up indentation
This commit is contained in:
parent
c3f55ad1d8
commit
0a95fd875d
@ -618,24 +618,26 @@ bool Matrix_implementation::invert_4x3( const Matrix_implementation& mat )
|
||||
return invert_4x3(tm);
|
||||
}
|
||||
|
||||
register value_type r00, r01, r02,
|
||||
r10, r11, r12,
|
||||
r20, r21, r22;
|
||||
// Copy rotation components directly into registers for speed
|
||||
r00 = mat._mat[0][0]; r01 = mat._mat[0][1]; r02 = mat._mat[0][2];
|
||||
r10 = mat._mat[1][0]; r11 = mat._mat[1][1]; r12 = mat._mat[1][2];
|
||||
r20 = mat._mat[2][0]; r21 = mat._mat[2][1]; r22 = mat._mat[2][2];
|
||||
value_type r00 = mat._mat[0][0];
|
||||
value_type r01 = mat._mat[0][1];
|
||||
value_type r02 = mat._mat[0][2];
|
||||
value_type r10 = mat._mat[1][0];
|
||||
value_type r11 = mat._mat[1][1];
|
||||
value_type r12 = mat._mat[1][2];
|
||||
value_type r20 = mat._mat[2][0];
|
||||
value_type r21 = mat._mat[2][1];
|
||||
value_type r22 = mat._mat[2][2];
|
||||
|
||||
// Partially compute inverse of rot
|
||||
// Partially compute inverse of rot
|
||||
_mat[0][0] = r11*r22 - r12*r21;
|
||||
_mat[0][1] = r02*r21 - r01*r22;
|
||||
_mat[0][2] = r01*r12 - r02*r11;
|
||||
|
||||
// Compute determinant of rot from 3 elements just computed
|
||||
register value_type one_over_det = 1.0/(r00*_mat[0][0] + r10*_mat[0][1] + r20*_mat[0][2]);
|
||||
// Compute determinant of rot from 3 elements just computed
|
||||
value_type one_over_det = 1.0/(r00*_mat[0][0] + r10*_mat[0][1] + r20*_mat[0][2]);
|
||||
r00 *= one_over_det; r10 *= one_over_det; r20 *= one_over_det; // Saves on later computations
|
||||
|
||||
// Finish computing inverse of rot
|
||||
// Finish computing inverse of rot
|
||||
_mat[0][0] *= one_over_det;
|
||||
_mat[0][1] *= one_over_det;
|
||||
_mat[0][2] *= one_over_det;
|
||||
|
Loading…
Reference in New Issue
Block a user