Mario Veraart (rioj7++at++fel.tno.nl)
Thu, 18 Sep 1997 20:00:22 +0200 (MET DST)
I have writen a performer application that heavily relies on the
pfBox::contains(pfBox*) member function. Sometimes the results where
not as expected and it turned out that there is a possible bug
in the pfBox routine. The following code gives a wrong result.
pfBox blockBox;
pfBox tileBox;
blockBox.min.set(34500, 72000, -1);
blockBox.max.set(45500, 83000, 1);
tileBox.min.set(44455, 80499, -1);
tileBox.max.set(47020, 83057, 1);
int result = blockBox.contains(&tileBox);
pfNotify(PFNFY_INFO, PFNFY_PRINT , "result: %x = %s %s %s\n",
result,
(result&PFIS_MAYBE)?"PFIS_MAYBE":"",
(result&PFIS_TRUE )?"PFIS_TRUE":"",
(result&PFIS_ALL_IN)?"PFIS_ALL_IN":"");
The result it prints is
result: 4 = PFIS_ALL_IN
It should have been
result: 3 = PFIS_MAYBE PFIS_TRUE
The manual page of pfBox says that if PFIS_ALL_IN is set then also
PFIS_MAYBE and PFIS_TRUE are set. And this is not true.
There where more cases where the result was wrong.
I had to make the testing box a lot bigger (2000m) to get rid of
most of the errors.
I use Perfomer 2.01 on Irix 5.3.
Mario
=======================================================================
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:57 PDT