open-discussion > RE: How to apply transformation matrix
Dec 3, 2013  11:12 PM | Marc Lalancette - Montreal Neurological Institute
RE: How to apply transformation matrix
Hmm... I'm getting more and more uncertain.  

I think the meaningful object here is the matrix, not the storage order of elements.  Thus if the OpenGL convention is to have the translation elements on the right of the matrix, and you want to follow that convention but with row-major order, shouldn't the translation elements not be in m13, 14, 15, but accordingly in m4, 8, 12?  Then the transformation would be M * v (as in chapter 3 of that "red book").  But if you decided to have the convention of translation elements in 13, 14, 15, then the proper transformation would be M^T * v  (or v^T * M).

Either way, the ambiguity seems a problem to me.  If the GIFTI specification doesn't say, then different programs will decide to do it differently and thus be incompatible.  As it stands, I'm still not sure.

You're right that if all I needed was to take GIFTI files created from a single other source, I could just try and figure out how they implemented it, but since I'm currently implementing my own, I have to decide how to encode and use this matrix.  I could do it both ways and it would work.  I just assumed that there would be a convention in the GIFTI format that I should follow.

Threaded View

TitleAuthorDate
Marc Lalancette Dec 3, 2013
John Harwell Dec 3, 2013
Marc Lalancette Dec 3, 2013
John Harwell Dec 3, 2013
RE: How to apply transformation matrix
Marc Lalancette Dec 3, 2013
Richard Reynolds Dec 4, 2013
Richard Reynolds Dec 4, 2013
Marc Lalancette Dec 4, 2013