order of rotations,help

New Message Reply Date view Thread view Subject view Author view

Maria Gallegos (thecure++at++unm.edu)
Fri, 23 Jun 1995 12:31:47 -0600 (MDT)


I was wondering if the following would work if I wanted to
 first rotate around z then y then x :

     
      pfMakeIdentMat(mat);
      pfPreRotMat(rotmat, xrot_degrees , 1.0f, 0.0f,0.0f ,mat);
      pfPreRotMat(mat, yrot_degrees , 0.0f, 1.0f, 0.0f,rotmat);
      pfPreRotMat(rotmat, zrot_degrees ,0.0f,0.0f, 1.0f,mat);

      ?????or should I multiply starting with z, then y, then x??????
      pfPreRotMat(rotmat, zrot_degrees ,0.0f,0.0f, 1.0f,mat);
      pfPreRotMat(mat, yrot_degrees , 0.0f, 1.0f, 0.0f,rotmat);
      pfPreRotMat(rotmat, xrot_degrees , 1.0f, 0.0f,0.0f ,mat);

then if I make the translation matrix:
      pfMakeTransMat(transmat, x, y,z);

then I want to Translate then Rotate so:
      pfMultMat(finalmat, rotmat, transmat);

and then get the Channel View Matrix:

    pfGetChanViewMat(chan, channelViewmat);

and finally apply the transformation:

    pfMultMat( finalmat, channelViewmat , finalmat);
    pfChanViewMat(chan, finalmat);

I'm hoping this would first Translate then rotate z then y then x.

But Still no luck,... see anything I'm doing wrong?

thanks,

maria
thecure++at++unm.edu


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:36 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.