Implemented Polytope::contains(..) for triangle vertices and added support for using the results mask.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -390,8 +390,8 @@ class OSG_EXPORT Polytope
|
||||
if (_resultMask&selector_mask)
|
||||
{
|
||||
itr->transformProvidingInverse(matrix);
|
||||
selector_mask <<= 1;
|
||||
}
|
||||
selector_mask <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user