| 340 | | osg::notify(osg::NOTICE)<<"We've found intersections!!!!"<<std::endl; |
| | 340 | osg::notify(osg::NOTICE)<<"We've found intersections!!!!"<<std::endl; |
| | 341 | |
| | 342 | osg::Geode* geode = new osg::Geode; |
| | 343 | root->addChild(geode); |
| | 344 | |
| | 345 | geode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF); |
| | 346 | |
| | 347 | for(osgSim::SphereSegment::LineList::iterator itr=lines.begin(); |
| | 348 | itr!=lines.end(); |
| | 349 | ++itr) |
| | 350 | { |
| | 351 | osg::Geometry* geom = new osg::Geometry; |
| | 352 | geode->addDrawable(geom); |
| | 353 | |
| | 354 | osg::Vec3Array* vertices = itr->get(); |
| | 355 | geom->setVertexArray(vertices); |
| | 356 | geom->addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP, 0, vertices->getNumElements())); |
| | 357 | } |