From: SourceForge.net <no...@so...> - 2012-12-06 21:54:08
|
Bugs item #3593340, was opened at 2012-12-06 13:54 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=437247&aid=3593340&group_id=43735 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: GMTL Group: 0.1.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: invert (c, transpose (b, a)) Initial Comment: Given an AFFINE Matrix44f with translation components in column [3], this sequence gives an incorrect result: Matrix44f a, b, c; // Set matrix a with non-zero translation and a.mState = AFFINE invert (c, transpose (b, a)); The problem is that transpose merely copies the mState (AFFINE), so invert calls invertAffine, which contains this: // handle matrices with translation if (COLS == 4) { // The right column vector of the matrix should always be [ 0 0 0 s ] // this represents some shear values result[3][0] = result[3][1] = result[3][2] = 0; There are two work-arounds: * Reverse the order of operations (which is mathematically equivalent and avoids the bug): // invert (c, transpose (b, a)); // transpose fails to change mState, invert makes bad assumption transpose (c, invert (b, a)); // avoid the bug * Force mState to FULL before invert: transpose (b, a); b.mState = FULL; invert (c, b); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=437247&aid=3593340&group_id=43735 |