|
- bool pick( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
- {
- osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>( &aa );
- if ( viewer )
- {
- osgUtil::LineSegmentIntersector::Intersections sections;
- if ( !viewer->computeIntersections(ea.getX(), ea.getY(), sections) )
- return false;
- osgUtil::LineSegmentIntersector::Intersections::iterator litr = sections.begin();
- for ( osg::NodePath::iterator nitr = litr->nodePath.begin(); nitr != litr->nodePath.end(); nitr++ )
- {
- std::cout << (*nitr)->className() << std::endl;
复制代码 error C2440: “初始化”: 无法从“std::_Vector_const_iterator<_Myvec>”转换为“std::_Vector_iterator<_Myvec>”
该如何解决呢 |
|