glRotate vs. glMultMatrix



  • hi,

    at the moment i am working with motion capturing files (.asf/.amc).
    i have some problems with my matrices. they aren't working correct. i have stored my matrices in arrays like this: float m[16].
    my rotation matrix around z looks then like this:
    double v=(90/180)*pi;
    double w=(90/180)*pi;

    rz[0]=cos(w); rz[4]=(-sin(w)); rz[8]=0; rz[12]=0;
    rz[1]=sin(w); rz[5]=cos(w); rz[9]=0; rz[13]=0;
    rz[2]=0; rz[6]=0; rz[10]=1; rz[14]=0;
    rz[3]=0; rz[7]=0; rz[11]=0; rz[15]=1;

    then i took this matrix and put it on the stack.
    glMatrixMode(GL_MODELVIEW); //Modelviewmatrix
    glLoadIdentity();
    glPushMatrix();
    glMultMatrixf(rz);
    glPopMatrix();

    actually my object has to rotate 90 deg around z but it doesn't. what am i doing wrong?

    when i use glRotatef(90.0,0.0,0.0,1.0); everything works out fine. but i need to work with the other matrices. i need to get my transformation matrix with glMultMatrix();

    has someone experiences with that? i would be very pleased!

    thx.


Anmelden zum Antworten