Re: [css3-3d-transforms] matrix3d() uses column-major order, but CSSMatric properties row-major ?

On 9/8/10 8:52 PM, Chris Marrin wrote:
> We should also make the order of parameters passed to matrix3d() clear. I don't think it is clear currently.

The spec pretty clearly says:

  matrix3d(<number>, <number>, <number>, <number>, <number>, <number>,
           <number>, <number>, <number>, <number>, <number>, <number>,
           <number>, <number>, <number>, <number>)
     specifies a 3D transformation as a 4x4 homogeneous matrix of 16
     values in column-major order.

I don't know what's unclear about that, unless the reader doesn't know 
what column-major order is.  On the other hand, I suppose one could 
argue that this definition is pretty jargon-heavy, between that and the 
"homogeneous matrix" bit.

What the spec does NOT define, on the other hand, is what transformation 
this matrix represents.  For example, nowhere does it say that such a 
matrix transforms the point (x, y, z) to (x', y', z') by taking the 
column vector (x, y, z, 1) and left-multiplying by the given 
transformation matrix, then taking the first three coordinates of the 
resulting vector in order.  At least this is what I assume it means to 
do.  If it were doing right-multiplication on row vectors, then the same 
transformation would, of course, be represented by the same numbers but 
now in row-major order....

-Boris

Received on Thursday, 9 September 2010 01:11:27 UTC