I'm currently studying about world space transformation matrices and encountered some confusion regarding their application in different matrix orders (row major vs column major).
Context
- In row major order, a point is represented as
[x,y,z] - In column major order, the same point is represented as
[[x], [y], [z]]
World Space Transformation
- For column major order, we use post-multiplication:
P1 = WST * p1 = S * Rx * Ry * Rz * T * p1 - For row major order, it's we use pre-multiplication:
P2 = p2 * WST = p2 * T * Rz * Ry * Rx * S
However, I feel, for row major it should instead be: P2 = p2 * WST' = p2 * T' * Rz' * Ry' * Rx' * S where ' denotes transpose of the matrix.
My Reasoning
Both P1 and P2 represent the same transformed point, just in different orders (column major vs row major).
So, P2 = P1' = (S * Rx * Ry * Rz * T * p1)'
Since, (AB)' = B'A'
We can say that, P1 = p1' * T * Rz * Ry * Rx * S = p2 * T * Rz * Ry * Rx * S (as p1' = p2)