Fix using outside information to erroneously filter bboxes during traversal

This commit is contained in:
Mael Rouxel-Labbé 2022-05-24 14:31:00 +02:00
parent d56584bf28
commit 3a64952314
1 changed files with 5 additions and 1 deletions

View File

@ -267,7 +267,11 @@ public:
for(int i=0; i<4; ++i)
{
if(!q.m_b.test(i) && do_overlap(q.m_tbox[i], bb) && Base::operator()(q.m_triangles[i], bb))
// this overload of do_intersect() must not filter based on q.m_b because
// it is called from the AABB_tree's traversal with a node's bounding box,
// and the fact that a facet is incident to an outside cell is irrelevant
// for the hierarchy of bounding boxes of the primitives.
if(do_overlap(q.m_tbox[i], bb) && Base::operator()(q.m_triangles[i], bb))
return true;
}