0

Traditionally notation of a Transformation matrix is as such:

R1 R2 R3 T1
R4 R5 R6 T2
R7 R8 R9 T3
0  0  0  1

The C# System.Numerics.Matrix4x4 class seems to use this convention instead: https://learn.microsoft.com/fr-fr/dotnet/api/system.numerics.matrix4x4?view=net-6.0

R1 R4 R7 0
R2 R5 R8 0
R3 R6 R9 0
T1 T2 T3 1

This is exactly transposed. This means multiplications must be adjusted accordingly: M1 * M2 must be changed to M2_transposed * M1_transposed

Is there some reason for this? Ive never seen this transposed notation used anywhere

Claude Hasler
  • 396
  • 1
  • 14
  • You might want to check [This Question](https://stackoverflow.com/q/17717600/15498) which asks essentially the same about why matrices are laid out like that for OpenGL (but also the same for DirectX, I understand). – Damien_The_Unbeliever Mar 23 '22 at 13:41
  • 1
    `System.Numerics` are vector math types, and in order for it to be efficient for SIMD a column-major order is preferred – phuclv Mar 23 '22 at 16:28

0 Answers0