[Development] matrix math help needed - https://bugreports.qt.io/browse/QTBUG-84441

Edward Welbourne edward.welbourne at qt.io
Tue May 26 19:33:21 CEST 2020

On Tuesday, 26 May 2020 09:17:05 PDT Edward Welbourne wrote:
>> (Matrix multiplication isn't commutative.)

Thiago Macieira (26 May 2020 18:42)
> This more or less summarises all I remember from matrix classes from high
> school.

While I'm a linear algebraist ... and aware that the orthodoxy of
graphics programming does things "a bit differently" than linear
algebraists do, but allegedly for good reasons (that I might one day
learn).  It's just the same thing written differently.

>> I'll try to work out whether QMatrix / QTransform are consistent about it

It seems QTransform was the only one in question here; and its matrices
are the transposes of what I would have expected; hence its
multiplication happens in the reverse of the order I expected.  This is
a self-consistent way to do things, just confusing to those who think
they know how matrices work.  It turns out that either way round works
fine, as long as you're consistent.  Which QTransform appears to be; and
its docs correctly describe it the way it is.


More information about the Development mailing list