Commit eb409fc
fix quattomatrix33 row/column-major mismatch
quattomatrix33 outputs column-major (comment says "opengl major") but
quatfrommatrix33 reads row-major, and the 4x4 quattomatrix also outputs
row-major. This means a quat->matrix33->quat roundtrip produces the
conjugate (inverse rotation) instead of the original quaternion.
Fix by swapping the three off-diagonal pairs so quattomatrix33 outputs
row-major, consistent with the rest of the codebase.
The only runtime caller is barycentric_svd.c which passes the result to
cn_copy_in_row_major() — previously loading the transpose, now correct.
This doesn't affect tracking results because it only needs an arbitrary
valid rotation for control point initialization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 477688f commit eb409fc
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | | - | |
552 | | - | |
| 551 | + | |
| 552 | + | |
553 | 553 | | |
554 | | - | |
| 554 | + | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | | - | |
559 | | - | |
| 558 | + | |
| 559 | + | |
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
| |||
0 commit comments