fixed multmatrix when a scaling factor is present
This commit is contained in:
parent
49a15ebd82
commit
2c15159659
|
@ -232,6 +232,7 @@ public:
|
|||
|
||||
/* multiply the current reference frame for the matrix passed
|
||||
note: it is up to the caller to check the the matrix passed is a pure rototraslation
|
||||
the matrix can have a scaling component, but is assumed uniform over the rows
|
||||
*/
|
||||
void MultMatrix( vcg::Matrix44<S> m44)
|
||||
{
|
||||
|
@ -239,6 +240,7 @@ public:
|
|||
m44[0][3] = m44[1][3] = m44[2][3] = 0.0; //set no translation
|
||||
const S k = m44.GetRow3(0).Norm(); //compute scaling (assumed uniform)
|
||||
Extrinsics.rot = Extrinsics.rot * m44.transpose() * (1/k);
|
||||
Extrinsics.rot.ElementAt(3,3)=S(1.0); //fix back after scaling
|
||||
}
|
||||
|
||||
/* multiply the current reference frame for the similarity passed
|
||||
|
|
Loading…
Reference in New Issue