Hi Lucie, take a look to osgPick example to see the correct way of using intersection visitors and routines. Ricky
On Mon, Jul 19, 2010 at 09:56, lucie lemonnier <[email protected]>wrote: > Hello, > I use osg:: LineSegment to perform an intersection between a ray starting > from a wand and the objects in my scene. Here is my code: > > > osg::Vec3 wandpt1; > osg::Vec3 wandpt2; > > line = new osg::LineSegment(wandpt1,wandpt2); > > osg::BoundingBox modelbox; > modelbox.expandBy(modelTransf->getBound()); > > if(line->intersect(modelbox)){ > std::cout << "intersection with the cow" << std::endl; > > } > > The problem is that detection is not very precise. > Do you know another solution in openscenegraph for this? > > > Thank you! > > lucie > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=30105#30105 > > > > > > _______________________________________________ > 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

