diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 68874d515..2dfe3dd35 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -222,72 +222,79 @@ void CullVisitor::popProjectionMatrix() template bool _clampProjectionMatrix(matrix_type& projection, double& znear, double& zfar, value_type nearFarRatio) { - if (zfar>=znear) + double epsilon = 1e-6; + if (zfar= static_cast(viewport->x()) && my >= static_cast(viewport->y()) && @@ -705,12 +707,6 @@ PickVisitor::PickVisitor(const osg::Viewport* viewport, const osg::Matrixd& proj addLineSegment(lineSegment); - -#if 0 - // account for the view matrix by pushing it onto the IntersectionState stack, - // this then transforms the line segment into world coordinates. - pushMatrix(new RefMatrix(view), osg::Transform::ABSOLUTE_RF); -#endif } }