I have a bit of confusion regarding the row / column order of the matrix structure of CATransform3D. The structure defines such a matrix:
[m11 m12 m13 m14] [m21 m22 m23 m24] [m31 m32 m33 m34] [m41 m42 m43 m44]
At first it would seem that the values โโdefine the rows (so that [m11 m12 m13 m14] forms the first row), but when you create the translation matrix (tx, ty, tz), the matrix will look like this: this:
[ 1 0 0 0] [ 0 1 0 0] [ 0 0 1 0] [tx ty tz 1]
My confusion comes from the fact that this is not a valid translation matrix; multiplying it by a 4-element vector column will not translate a point.
I assume that the CATransform3D structure stores values โโin column order, so that the values โโof [m11 m12 m13 m14] form the first column (not the first row).
Can anyone confirm?
source share