- Shot::MultMatrix(Matrix44) now accepts matrices with scaling. Corrected the rotation multiplication.
This commit is contained in:
parent
a5fc2fae6a
commit
f310574e04
|
@ -236,8 +236,9 @@ public:
|
||||||
void MultMatrix( vcg::Matrix44<S> m44)
|
void MultMatrix( vcg::Matrix44<S> m44)
|
||||||
{
|
{
|
||||||
Extrinsics.tra = m44 * Extrinsics.tra;
|
Extrinsics.tra = m44 * Extrinsics.tra;
|
||||||
m44[0][3] = m44[1][3] = m44[2][3] = 0.0;
|
m44[0][3] = m44[1][3] = m44[2][3] = 0.0; //set no translation
|
||||||
Extrinsics.rot = m44 * Extrinsics.rot ;
|
const S k = m44.GetRow3(0).Norm(); //compute scaling (assumed uniform)
|
||||||
|
Extrinsics.rot = Extrinsics.rot * m44.transpose() * (1/k);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* multiply the current reference frame for the similarity passed
|
/* multiply the current reference frame for the similarity passed
|
||||||
|
|
Loading…
Reference in New Issue