Re: performer channel view

New Message Reply Date view Thread view Subject view Author view

Rémi Arnaud (remi++at++remi.engr.sgi.com)
Mon, 11 Aug 1997 11:23:21 -0700 (PDT)


Anita Kishore wrote:
>
> Hi :
>
> I am trying to compare and get to work two different ways of
> setting eye point's position and orientation. For both the methods, the
> scene graph is same, having just one simple geometry with pre and post
> DRAW callbacks.
>
> method 1 :
> ----------
> - set performer channel's view matrix with the foll. values:
> view.xyz = (2.5, -5, 1.6), view.hpr = (9, 5, 3)
> - get openGL modelview matrix in the pre callback and print it.
> - matrix printed is:
>
> matarray :
> 0.985621 0.065307 0.155839 0.000000
> 0.160725 -0.077778 -0.983930 0.000000
> -0.052137 0.994829 -0.087156 0.000000
> -1.577008 -2.143883 -5.169798 1.000000

 Note that the offsets (pfChannel::setViewOffsets) are also applied if
 non null to that transformation matrix

>
>
> method 2 :
> ----------
> - reset performer channel's view matrix to all 0, ie:
> view.xyz = (0,0,0), view.hpr = (0,0,0)
> - in the pre callback, use pfMakeCoordMat to make coordMat
> with the foll. values:
> xyz = (2.5, 1.6, 5.0) - in openGL coordinate system
> hpr = (9, 5, 3)
> - pfMakeRotMat(viewMat, 90.0, 1, 0, 0) - to convert rotation part
> from pf to openGL coordinate system.
> - pfPostMultMat(viewMat, coordMat)
> - load viewMat into the modelview stack and print viewMat as:
>
> viewMat :
> 0.985621 0.160725 -0.052137 0.000000
> 0.065307 -0.077778 0.994829 0.000000
> 0.155839 -0.983930 -0.087156 0.000000
> 2.500000 1.600000 5.000000 1.000000
>
>
> Clearly, the two matrices printed in both the methods are not same and hence
> the
> perspective that I get in the render window is also not the same. Infact, in
> matarray, the translation components are not only inverted in sign, but also
> show different values from the ones set in the channel's view. They and the
> rotaion part of the matrix also differ from that printed in viewMat of
> method 2.
>
> Can someone explain about these discrepancies and how to make the two methods
> work in the same way?
>
> Thanks a lot for any clue.
>
> -anita
> kishore++at++triavest.com
>

    _ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
                                           
=======================================================================
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:43 PDT

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