From: H. H. <hen...@gm...> - 2008-08-24 18:32:31
|
Actually, yes, you are absolutely correct. So glmMatSet3f (&mat, &a, &b, &c); should construct | a.x b.x c.x | | a.y b.y c.y | | a.z b.z c.z | Got it! On Sun, Aug 24, 2008 at 8:47 PM, Branan Riley <br...@gm...> wrote: > I believe OpenGL defines a matrix constructed from vectors like this: > | a.x b.x c.x | > | a.y b.y c.y | > | a.z b.z c.z | > > We should do the same for consistency. > > Branan > > On Sun, Aug 24, 2008 at 9:27 AM, Henri Häkkinen <hen...@gm...> > wrote: > > There are some open questions in the mathlib's matrix api and I would > like > > to hear your opinions. > > > > Do the matrices need member-wise constructors? For example, do we need > > something like this: > > > > GLMmat2f mat; > > glmMatSet2f (&mat, 1.0f, 2.0f, 3.0f, 4.0f); > > > > I suppose the user never needs to do anything like this, instead they use > th > > higher level entry-point such as Identity and Rotate. > > > > However, there might be a need for constructing matrices from vectors. > > > > GLMvec3f a, b, c; > > GLMmat3f mat; > > glmMatSet3f (&mat, &a, &b, &c); > > > > At the moment, I have these entry-points and the matrices are constructed > > 'column-wise'. For example, the previous code creates this kind of > matrix: > > > > | a.x a.y a.z | > > | b.x b.y b.z | > > | c.x c.y c.z | > > > > Should the matrices be build row-wise instead? There is an advantage in > > this, as matrix rows define the coordinate axes in a 3D coordinate space. > > However, OpenGL defines the matrix memory layout as column-wise, so I > guess > > it is a kind of more logical to build them column-wise from the vectors. > > > > -- > > Henri 'henux' Häkkinen > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Glsdk-devel mailing list > > Gls...@li... > > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Glsdk-devel mailing list > Gls...@li... > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > -- Henri 'henux' Häkkinen |