--- On Thu, 15/1/09, Gazi Alankus <ala...@gmail.com> wrote:

> From: Gazi Alankus <ala...@gmail.com>
> Subject: Re: [osg-users] getting translate rotate scale right.
> To: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org>
> Date: Thursday, 15 January, 2009, 6:25 PM
> I can't tell you the right answer, but maybe this might
> help a little bit.
> [rant]
> OSG matrices are not "correct" homogeneous
> transformation matrices.

Eh? By what definition exactly?

>They are
> transposed. When you come up with a solution that involves
> multiplication of
> transformation matrices on paper, you have to reverse the
> order of
> multiplications when implementing it with OSG to get things
> working.
> 
> This problem arises from the confusion that OpenGL stores
> matrices in
> column-major order and OSG treats that data as if it was
> stored in row-major
> order, effectively transposing the matrix.

OpenGL is neither row-major or column-major. It treats a transformation matrix 
as 16 floats, nothing more. Only when one imposes a 4x4 structure of rows and 
columns on the 16 numbers does one then encounter the question "Which way shall 
I order them?". At that point you choose row-major or column-major as the 
description of how your data is stored in the matrix.

> There is no such
> thing as
> "row-major matrix" since matrices are
> mathematical entities that have
> nothing to do with storage.

Yes there is, I've just described it above. It's storage that has nothing to do 
with it i.e. OpenGL's view of it as 16 numbers, it's how you construct your 
mathematical entity, your matrix, that imposes one view or the other.

Paul


      
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to