corrected a bug in ApplySimilarity (the translation was not zeroed when

transforming the rotational part)
This commit is contained in:
ganovelli 2011-10-11 15:41:54 +00:00
parent bf01793bd8
commit f20ecb9db7
1 changed files with 4 additions and 3 deletions

View File

@ -509,9 +509,10 @@ void Shot<S, RotationType>::ApplySimilarity( Matrix44<S> M)
vcg::Matrix44<S> M2 = M;
M2 = M2 * scalefactor;
M2[3][3] = 1.0; //unnecessary, it will multiply a pure rotation
M2 = M2 * scalefactor; // remove the rotation
M2[3][3] = 1.0;
M2[0][3] = M2[1][3] = M2[2][3] = 0; // remove the translation
rotM = rotM * M2.transpose();
Extrinsics.SetRot(rotM);
}