Hi Adam, On 29 April 2012 11:23, Adham Alendar <[email protected]> wrote: > I have a geometry with multiple line strips each line strip is primitive set, > i use polytobe intersector for picking certain line, the intersector will get > me the geometry and the primitive index of selected line ,how can i get the > selected line?..even if i give the intersector dimension mask of DimOne so it > only handle line the returned primitive doesn't give me clue what line is > picked??
The osgUtil::Intersectors use a primitive functor access the geometry in Drawables in a generic way that doesn't provide all the details of the original osg::Geometry primitive data so isn't in a place to pinpoint which PrimitiveSet that the hit occurs. Due to this one has to infer which PrimitiveSet and indices by stepping through the osg::Geometry's PrimitiveSet's and counting the individual primitives within them till you get a match. You'll be able to use the vertex indicies provided by the intersection data to do the matching as well, but would still have to use the same iterative approach of stepping through the PrimitiveSet. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

