Author Topic:   Help me with this bug
posted November 03, 1999 12:51 AM            
I am implementing my split operations as per Seamus' bintri paper but something is going wrong. In split where the call is made to split the bottom neighbor a bug seems to rise

if tri->BottomNeighbor->BottomNeighbor != tri

If the code performs the split in the if then the bottom neighbor again calls the split in the if then corruption occurs. What happens is that the second bottom neighbor split points its bottom neighbor to the first bottom split when it should be pointing its bottom neighbor to one of the new children from the first bottom neighbor split...very hard to visualize but draw 3 triangles each connected from base to left neighbor and each successive trianlge being from a coarser level...then try a split operation on the smallest one and it will enter the if statment above twice in a row.

I've exhausted myself explaing that



LDA Seumas
posted November 13, 1999 07:08 AM           
It sounds like your pointers mustn't be getting set properly; perhaps in the incorrect order as you progress through the recursive splits?

I'm pretty sure the pseudo code in the article should be correct, as it was basically lifted straight out of my engine.

If the routines are small, and you haven't found the bug yet, you could post them here or e-mail them and I might be able to help.

-- Seumas McNally, Lead Programmer, Longbow Digital Arts