Affine Matrix Encoding Issues
Benjamin-Dobell opened this issue · 0 comments
Benjamin-Dobell commented
It would seem you're encoding translation in the last row of a matrix but multiplying as if it were stored in the last column. e.g.
>>> matrix.Matrix(3).translate(vector.Vector(3, data=[35, -60, 1])) * vector.Vector(3, data=[0, 0, 1])
Vector: size:3 , data:[0.0, 0.0, 1.0]
The result of that multiplication really ought to be a vector (35, -60, 1).
It's also incorrect that a 3x3 matrix requires a 3D vector for translation, it should take a 2D vector. In the above example I had to add an extra 1 to the end of my translation vector.