From 585f1d0f68c6d303347ae21fed3320865f4be316 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Fri, 21 Apr 2006 17:16:49 +0000 Subject: [PATCH] Fixed a cut-n-paste error in the ground intersects. --- src/osgGA/UFOManipulator.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/osgGA/UFOManipulator.cpp b/src/osgGA/UFOManipulator.cpp index f4c12db07..9e5ffc0e2 100644 --- a/src/osgGA/UFOManipulator.cpp +++ b/src/osgGA/UFOManipulator.cpp @@ -140,13 +140,9 @@ void UFOManipulator::computeHomePosition() if (iv.hits()) { osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(seg.get()); - for(osgUtil::IntersectVisitor::HitList::iterator hitr=hitList.begin(); - hitr!=hitList.end(); ++hitr) - { - osg::Vec3d ip = hitList.front().getWorldIntersectPoint(); - if( fabs(ip[2]) < ground ) - ground = ip[2]; - } + osg::Vec3d ip = hitList.front().getWorldIntersectPoint(); + if( fabs(ip[2]) < ground ) + ground = ip[2]; } else {