lechnerr++at++adadv1.mdc.com
Mon, 8 May 1995 16:23:53 -0500
. |
. | Screen
. | Plane
. .|
. .
. .
eye < .
I also want to make sure I am attaching the perspective matrix correctly. The following is a
snipet from my code. It is within a Draw Callback function.
(done before DrawCallback)
frust1 = pfNewFrustum(NULL);
frust2 = pfNewFrustum(NULL);
Draw Callback:
{
/** Set up Key Comensation Matrix **/
pfMakeIdentMat(key_comp_mat);
pfSetVec3(key_comp_vec,key_x,key_y,key_z);
pfSetMatColVec3(key_comp_mat,2,key_comp_vec);
/** Get Perspective Frustum and Apply Comp **/
pfGetBaseFrust(chan,frust1);
pfOrthoXformFrust(frust2,frust1,key_comp_mat);
pfApplyFrust(frust2);
pfDraw();
}
This seems to effect the perspective correctly. I'm just missing the correct compensation
factors.
PS- I tried putting the frustum data back into pfChan in pfOrthoXformFrust as the man pages
state, but it complained. My only guess is that pfChan does not carry along the actual
projection matrix, on the perspective parameters to build the matrix?
RJL
McDonnell Douglas Corp.
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:29 PDT