Daniel Delgado (renata++at++eos.arc.nasa.gov)
Tue, 2 Sep 1997 10:28:02 -0700 (PDT)
Heres the problem... I am coding in the off-axis projection
routines that Southard developed in:
Viewing Model for Virtual Environment Displays
David A. Southard
Journal of Electronic Imaging
October 1995 Vol. 4(4)/412
Which to my mind is the most comonsensical approach to doing
this type of display (a 'virtual window' or 'Head Tracked Display'
in Southards terminology). Southard's algorithm produces a Viewpoint
and a Projection matrix.
Now, I know that I can create an off-axis projection using the
typical use of the pfMakePerspFrust to obtain a frustum that
I can use. For example,
pfFrustNearFar(left, 1.0f, 1000.0f);
pfMakePerspFrust(left, n1, n2, n3, n4);
Where I can use the subsidary transformations from the Southard
algorithm to obtain the frustum coordinates; i.e. solve for n1,n2,n3,and n4;
But I _really_ want to check out David's algorithm ... meaning
I want to use his shear operations and perspective operations etc..
I want to be able to take his Projection Matrix and use it directly
in the Performer program.
Now I have tried the following
frust1 = pfNewFrust(NULL);
frust2 = pfNewFrust(NULL);
pfFrustNearFar(frust1, ViewState->HTD.StP_Near, ViewState->HTD.StP_Far);
pfMakePerspFrust(frust1, 1, -1, 1, -1 );
pfOrthoXformFrust(frust2,frust1,ViewState->HTD.N_projection);
pfApplyFrust(frust2);
pfChanViewMat (chan,ViewState->HTD.N_viewpoint);
Which I think should work... make a perspective frustum that is in essence
a orthogonal frustum... then take the Projection Matrix and transform the
frustum and then apply it using the pfApplayFrust command.. but
it does not work ....sigh... any help would be greatly appreciated.
P.S. David.. if you are reading this... yep I am _finally_
finishing this up... I will email you a copy of the demo
code when I am done. Thanks again for the wonderful work.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:50 PDT