[x3d-public] Row/column-order in the SFMatrix*, MFMatrix* fields, I think X3DOM reading order contrasts to what spec says
John Carlson
yottzumm at gmail.com
Sun Nov 23 17:31:22 PST 2025
Holger, that’s the 4.1 standard on the link.
On Sun, Nov 23, 2025 at 4:45 AM Holger Seelig via x3d-public <
x3d-public at web3d.org> wrote:
> Michalis,
>
> I think you are making a mistake. X3D matrices are in row-major fashion.
> From the current X3D4.0 standard:
>
> SFMatrix4d matrices are organized in row-major fashion. The first row of
> the matrix stores information for the x dimension, the second for the y
> dimension, and the third for the z dimension. Since these data types are
> commonly used for 3D transformation matrices, translation values are stored
> in the fourth row.
>
> This means the matrix should be:
>
> matrix
> 1 0 0 0
> 0 1 0 0
> 0 0 1 0
> 1 2 3 1
>
> The translation values are now in the last row as required by the standard.
>
> See also:
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/fieldTypes.html#SFMatrix4dAndMFMatrix4d
>
> https://en.wikipedia.org/wiki/Row-_and_column-major_order
>
> Best regards,
> Holger
>
> —
> Holger Seelig
> holger.seelig at yahoo.de
>
>
> Am 23.11.2025 um 01:38 schrieb Michalis Kamburelis via x3d-public <
> x3d-public at web3d.org>:
>
> matrix
> 1 0 0 1
> 0 1 0 2
> 0 0 1 3
> 0 0 0 1
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20251123/72f1d0a1/attachment.html>
More information about the x3d-public
mailing list