model view matrix and rotation

New Message Reply Date view Thread view Subject view Author view

Anita Kishore (kishore++at++triavest.com)
Mon, 14 Jul 1997 14:06:59 -0700


Hi :

        I am confused with the following:

I have a Pf application where the channel's view point pos = (x,y,z), and
orientaion = (0,0,0). The graphics object that it is looking at is at the
origin. This object's geode has pre and post draw callbacks. In the pre
callback I do :

        - set mmode to mviewing
        - push matrix
        - getmatrix
        - print matrix

As far as I understand, this matrix that I get is a composite transformation
matrix for view point. Which means that its transpose will be of the form:

        a11 a12 a13 tx
        a21 a22 a23 ty
        a31 a32 a33 tz
        0 0 0 1

tx, ty, tz are the translation part and the upper LHS 3X3 sub-matrix contains
the rotation and scale parts, right? But eventhough I do not have any rotation
or scale for the view point, the sub-matrix porion has some numbers in it and
when I do pfGetOrthoMatCoord(mat, dst), dst->xyz is fine, just as I set the
view point's position, but dst->hpr shows pitch = -90. Why is this not 0?
Why isn't the above matrix of the form:

        1 0 0 tx
        0 1 0 ty
        0 0 1 tz
        0 0 0 1 ???

Another related question is : what is the equivalent of getmatrix() in OpenGL?
The porting guide says GLGet(), but I can't find any man page or info in the
OPenGL book.

Thanks for any insight into this.

-anita

kishore++at++triavest.com

-- 
Anita Kishore
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

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:55:36 PDT

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