Implemented Polytope::contains(..) for triangle vertices and added support for using the results mask.

This commit is contained in:
Robert Osfield
2017-04-20 19:21:21 +01:00
parent 265efb85a1
commit 8f5493e573
4 changed files with 99 additions and 8 deletions

View File

@@ -176,10 +176,12 @@ class OSG_EXPORT KdTree : public osg::Shape
functor.intersect(_vertices.get(), i, tri.p0, tri.p1, tri.p2);
}
}
else if (functor.intersect(node.bb))
else if (functor.enter(node.bb))
{
if (node.first>0) intersect(functor, _kdNodes[node.first]);
if (node.second>0) intersect(functor, _kdNodes[node.second]);
functor.leave();
}
}

View File

@@ -390,8 +390,8 @@ class OSG_EXPORT Polytope
if (_resultMask&selector_mask)
{
itr->transformProvidingInverse(matrix);
selector_mask <<= 1;
}
selector_mask <<= 1;
}
}