nih_co April 18, 2005, 11:08 AM 

Your assumption of translate functions is incorrect.
when translating you are multiplying the current matrix by a translation matrix. this takes place in the form:
[ 11 12 13 q ][ 1 0 0 x ] [ 11 12 13 (11*x+12*y+13*z+q*1) ] [ 21 22 23 r ][ 0 1 0 y ] = [ 21 22 23 (21*x+22*y+23*z+r*1) ] [ 31 32 33 s ][ 0 0 1 z ] [ 31 32 33 (31*x+32*y+33*z+s*1) ] [ 0 0 0 1 ][ 0 0 0 1 ] [ 0 0 0 1 ]
where is your current translation (0,0,0) in your case. And is the amount you want to translate by.
Your concept of translation is only correct if the initial matrix is the identity. The way this appear to occur when tranforming an object is that translation occurs in local space. so if you rotate something first, then translate, the object will appear to move along its local axes, not world axes.
If you are doing a lot of transformations in opengl anyway, ust that function and get the matrix straight from ogl. its not going to affect performance really and it might even help because you avoid performing the trig in rotations on the cpu.
Anyone know why I cant get the code tags to work?
