Re: OGL View Matrix --> pfChan view matrix

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Thu, 11 Jun 1998 14:52:33 -0700


Allen wrote:
>
> I think I found the solution now. (Thanks to a message Angus replied to
> about a year ago)
>
> ...
> pfViewMat.set(ogl_matrix);
> pfViewMat.transpose(pfViewMat);
> pfViewMat.preRot(-90, 1, 0, 0, pfViewMat);
> pfViewMat.postRot(pfViewMat, 90, 1, 0, 0);
>
> chan->setViewMat(pfViewMat);
> ...
>
> That "seems" to work. Can anyone confirm if this is the correct
> solution?
>

Yes it's correct.

The idea is to rotate the Performer up axiz (z) onto OpenGL
up axis (y) perform the viewing transform in OpenGL coordinate
space, then transform y back onto z, in otherwords you can apply.

The transpose is to go from the viewing transfprmation of
OpenGL to the model transformation style used for the
pfChannel in Performer.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= 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:57:32 PDT

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