[osg-users] Bug? Unable to pick osgSim::SphereSegment

Morné Pistorius mpistorius.osg at googlemail.com
Wed Sep 10 02:20:21 PDT 2008


Hi all,

I seem to be unable to pick a osgSim::SphereSegment using a
LineSegmentIntersector.  I have many other models in my scene as well that
all work fine with the picker, including loaded models and manually
assembled geometries.  It is just the SphereSegment that doesn't respond.
 When I click on it, picker->containsIntersections() always returns false:

  osgUtil::LineSegmentIntersector* picker;
  picker = new osgUtil::LineSegmentIntersector(
osgUtil::Intersector::PROJECTION, ea.getXnormalized(),ea.getYnormalized() );

  osgUtil::IntersectionVisitor iv( picker );
  viewer->getCamera()->accept( iv );

  if ( picker->containsIntersections() )   <<<<------ ALWAYS FALSE
  {
    osgUtil::LineSegmentIntersector::Intersection intersection =
picker->getFirstIntersection();

    osg::NodePath& nodePath = intersection.nodePath;
    node = ( nodePath.size() >= 1 )? nodePath[ nodePath.size() - 1 ] : NULL;
  }


I will investigate this further, but I was hoping someone might have some
insights as to where to look for what goes wrong.  Is this a bug or is it
something specific to SphereSegments?  (I am using OSG v2.2)

Thanks!
Morne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080910/efc9af3b/attachment-0002.htm>


More information about the osg-users mailing list