PDA

View Full Version : Internal matrix representation



Orzech
09-19-2006, 09:16 AM
Hello!

I am reading "Essential Mathematics for Games & Interactive Applications" by Van Verth and Bishop, where authors say :
'And even in OpenGL, despite the fact that the documentation is written using column vectors, the internal representation premultiplies the vectors; that is, it expects row vectors as well.'

Ok, I understand that matrices in OGL are stored in column major order to pretranspose a matrix in the storage representation. But still - in OpenGL one always combines transformations in the opposite order, so how is it possible, that 'internal representation premultiplies the vectors'?

I would be thankful for making this one clear for me.

jide
09-19-2006, 11:02 AM
I'm not sure but I guess you misunderstood what you read. I think what the authors said is that:

normal maths for matrix are row major and vectors are column-vectors. And despite of the fact that the documentation of the book uses column vectors, you should use row vectors, that is, an aligned segment of memory. So when you use an array of vectors, all data are simply aligned.

Orzech
09-19-2006, 12:10 PM
Yes, it is all right what you say. Anyway, I think that 'premultiplies' used by authors is a really misleading word. In my opinion it suggests left -> right matrices concatenation, while this quote concerns memory alignment only.

Thanks