I've only used PolytopeIntersector to deal with point clouds. In this case, osgUtil::PolytopeIntersector::getIntersections() returns what I need (that is, all the points inside the polytope). I don't know, however, what exactly it counts as "intersections" when dealing with polygons. :-/
LMB On Fri, Nov 25, 2011 at 1:37 PM, Aurelien Albert <[email protected]> wrote: > Hum... there's still a problem... > > how can I retrieve intersected vertices from polytope intersection ? > > From a LineSegmentIntersector, I use this code : > > > Code: > intersection is a osgUtil::LineSegmentIntersector::Intersection instance from > LineSegmentIntersector > > osg::Geometry* pGeometry = > dynamic_cast<osg::Geometry*>(intersection.drawable.get()); > > if (pGeometry != NULL) > { > osg::ref_ptr<osg::Vec3Array> pVertexArray = > dynamic_cast<osg::Vec3Array*>(pGeometry->getVertexArray()); > if (pVertexArray != NULL) > { > for (unsigned int i=0; i<intersection.indexList.size(); i++) > { > if ( (nearestVertexIndex >= 0) && (nearestVertexIndex > < (int) pVertexArray->size()) ) > { > addVertexToSelection(pGeometry, > nearestVertexIndex); > } > } > } > } > > > > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44043#44043 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

