Changed from float to double the type of the alignment matrixes when changing the base mesh. This removes a precision issue that arose when changing the base mesh after a complete alignment.

This commit is contained in:
Paolo Cignoni cignoni 2012-02-02 10:16:57 +00:00
parent e004a7c813
commit b6df3b03b4

View File

@ -159,13 +159,13 @@ void EditAlignPlugin::hideRevealGluedMesh()
void EditAlignPlugin::setBaseMesh()
{
Matrix44f oldTr = md->mm()->cm.Tr;
Matrix44f inv = Inverse(oldTr);
Matrix44d oldTr = Matrix44d::Construct(md->mm()->cm.Tr);
Matrix44d inv = Inverse(oldTr);
md->mm()->cm.Tr.SetIdentity();
foreach(MeshNode *mn, meshTree.nodeList)
if(mn->glued && (mn->m != md->mm()) )
mn->m->cm.Tr *= inv;
mn->m->cm.Tr.Import(inv*Matrix44d::Construct(mn->m->cm.Tr));
alignDialog->rebuildTree();
gla->update();