This is how I (possibly mistakenly) understand it. Please correct me if I am wrong.
Assuming a 4x4 matrix composed of vectors v0 through v3 is stored in a one-dimensional array with indices [00] through [15]...
Arranged by vector:
{ v0.x, v0.y, v0.z, v0.w, // v0
v1.x, v1.y, v1.z, v1.w, // v1
v2.x, v2.y, v2.z, v2.w, // v2
v3.x, v3.y, v3.z, v3.w } // v3
- Column-major notation index positions:
[00] [04] [08] [12]
[01] [05] [09] [13]
[02] [06] [10] [14]
[03] [07] [11] [15]
- Row-major notation index positions:
[00] [01] [02] [03]
[04] [05] [06] [07]
[08] [09] [10] [11]
[12] [13] [14] [15]
Arranged by component:
{ v0.x, v1.x, v2.x, v3.x, // x components
v0.y, v1.y, v2.y, v3.y, // y components
v0.z, v1.z, v2.z, v3.z, // z components
v0.w, v1.w, v2.w, v3.w } // w components
- Column-major notation index positions:
[00] [01] [02] [03]
[04] [05] [06] [07]
[08] [09] [10] [11]
[12] [13] [14] [15]
- Row-major notation index positions:
[00] [04] [08] [12]
[01] [05] [09] [13]
[02] [06] [10] [14]
[03] [07] [11] [15]
Is this correct?
Arranged by vector:
terminology is ambiguous. 4-space Vectors can be row vectors(4x1) or column vectors(1x4). – agone Oct 19 '23 at 00:10