diff --git a/include/osgUtil/IntersectVisitor b/include/osgUtil/IntersectVisitor index 3464693d0..7f9d8a02f 100644 --- a/include/osgUtil/IntersectVisitor +++ b/include/osgUtil/IntersectVisitor @@ -186,7 +186,6 @@ class OSGUTIL_EXPORT IntersectVisitor : public osg::NodeVisitor IntersectStateStack _intersectStateStack; - osg::NodePath _nodePath; LineSegmentHitListMap _segHitList; LODSelectionMode _lodSelectionMode; diff --git a/src/osgUtil/IntersectVisitor.cpp b/src/osgUtil/IntersectVisitor.cpp index e7aed945a..eec48334d 100644 --- a/src/osgUtil/IntersectVisitor.cpp +++ b/src/osgUtil/IntersectVisitor.cpp @@ -176,7 +176,6 @@ void IntersectVisitor::reset() // create a empty IntersectState on the the intersectStateStack. _intersectStateStack.push_back(new IntersectState); - _nodePath.clear(); _segHitList.clear(); } @@ -300,7 +299,6 @@ bool IntersectVisitor::enterNode(Node& node) IntersectState::LineSegmentMask sm=0xffffffff; if (cis->isCulled(bs,sm)) return false; cis->_segmentMaskStack.push_back(sm); - _nodePath.push_back(&node); return true; } else @@ -314,7 +312,6 @@ void IntersectVisitor::leaveNode() { IntersectState* cis = _intersectStateStack.back().get(); cis->_segmentMaskStack.pop_back(); - _nodePath.pop_back(); } @@ -471,6 +468,13 @@ struct TriangleIntersect } Vec3 in = v1*r1+v2*r2+v3*r3; + if (!in.valid()) + { + osg::notify(WARN)<<"Warning:: Picked up error in TriangleIntersect"<