From: H. H. <hen...@gm...> - 2008-08-24 16:27:36
|
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 |