Matrix4f vs Matrix3f?

I’m not getting much luck in the other forum so I’ll try here:

Hello, I've been slowly learning OpenGL and Matrix math stuff.  A lot of the stuff I've read seems to hint that 4-dimensional matrices are somehow better and more common in 3D programming, though I don't really understand why.  But anyways, I was wondering why jME uses 3-dimensional matrices for all its stuff?  Doesn't OpenGL require 4-dimensional matrices?

Any help clearing the cobwebs out of my head would be much appreciated (I haven't taken linear algebra).

The reason why 4x4 matrices can be better is that they can contain all scaling, rotation and translation. While 3x3 can only handle scaling and rotation.

But we don't send transforms using glMultMatrix, but scale rotate and translate. And we also don't maintain the data in matrices but vectors and quaternion.

I know, not a good explaination of the reasons… but there you go. :slight_smile:

Hmm… I don't really understand.  Is it true that OpenGL requires 4x4 matrices? And even if you store the information in quats and such, doesn't it need to be converted back to matrices when given to OpenGL?

no, because we use glScale, glRotate, and glTranslate it modifies the OpenGL matrix internally.

I see, so is there any reason to actually use the Matrix classes at all?