Bug in pfuTraverse

New Message Reply Date view Thread view Subject view Author view

Ran Yakir (rany++at++bvr.co.il)
Wed, 17 Aug 1994 16:01:27 +0000


Hi All

I don't remember if I wrote about that bug before. Anyway, there is a bug in
the PFUTRAV_LOD_RANGE0 mode of pfuTraverse. When called using taht mode,
pfuTraverse should enter only the best LOD in an LOD node. However, it enters
no LOD at all.
The reason for that is propobaly a typo in the trav.c code :

case PFTYPE_LOD:
        switch (trav->mode & PFUTRAV_LOD_MASK)
        {
        case PFUTRAV_LOD_RANGE0:
                range0 = pfGetLODRange((pfLOD *)node, 0);
                range1 = pfGetLODRange((pfLOD *)node, 0);
                if (range0 <= 0.0f && 0.0f < range1)
                        if (numChild > 0)
                                ret = pfuTraverse(pfGetChild(node, 0), trav);
                break;

        ...
        ...
        }

Ofcourse, in that case, range0 and range1 are equal (both taken from LODrange
0). The condition can never be true, and no traversal is done for this node.

To fix replace

        range1 = pfGetLODRange((pfLOD *)node, 0);
with

        range1 = pfGetLODRange((pfLOD *)node, 1);

Regards

Ran Yakir

-- 
 __                                  | Ran Yakir
 /_)  _  __   \  / _   / o __        | Graphics App. Chief Engineer
/ )_ (_(_) )   \/ (_(_/<_(_)(        | BVR Technologies Ltd.
              _/                     |   
-------------------------------------+--------------------------------
Phone :                              | E-mail : rany++at++bvr.co.il
  Work : 972-3-5715671               |
  Res. : 972-3-6995364               |
Fax    : 972-3-5715668               |

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:50:28 PDT

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