Michael Jones (mtj++at++babar)
Tue, 9 May 1995 08:05:00 -0700
This is indeed a bug. First report I've seen, although it seems to
have inspired several similar bug reports. I looked at the code
and there is indeed a problem. I fixed it, though, and the new
results are as expected:
babar!mtj% cat frust.c
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "Performer/pr.h"
main ()
{
float t = 0.0f;
float h = 0.0f;
float v = 0.0f;
pfFrustum *frust;
t = pfTan(12.5f);
frust = pfNewFrust(NULL);
pfMakePerspFrust(frust, -1.0f, 0.0f, -t, t);
pfFrustNearFar(frust, 1.0f, 1000.0f);
pfGetFrustFOV(frust, &h, &v);
printf("h = %f\n", h);
printf("v = %f\n", v);
}
babar!mtj% make frust.dsocmd
babar!mtj% ./frust.dsocmd
h = 53.130104
v = 45.000004
The bug was that the center of projection was always mistakenly
computed to be at the "center" of the near plane, as is the case for
symmetric perspective frusta.
It's fixed now.
--Be seeing you, Phone:415.390.1455 Fax:415.965.2658 M/S:8U-590 Michael T. Jones Silicon Graphics, Advanced Graphics Division mtj++at++sgi.com 2011 N. Shoreline Blvd., Mtn. View, CA 94039-7311
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:29 PDT