Hi Sanat, My suggestion is to design a CylinderIntersector yourself and add it to the IntersectionVisitor. The most important methods to override will be:
// Make a clone of the intersector for the visitor to use internally, don't forget to set clonedIntersector->_parent = this virtual Intersector* clone( osgUtil::IntersectionVisitor& iv ); // Check if a node is intersected with the cylinder and return true if we should continue traversing the subgraph virtual bool enter( const osg::Node& node ); // Check if a drawable is intersected with the cylinder and record the results in any forms you want (like an Intersection list) virtual void intersect( osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable ); Then you may make use of some simple math formulas instead of adding a lot of planes. Have a look at the implementation of LinesegmentIntersector will be of help. Cheers, Wang Rui 2011/3/4 Sanat Talmaki <sanat.sch...@gmail.com>: > Hi, > > I want to test for intersection in my scene using a cylinder instead of a > line segment. > > For example if my object is on a terrain I want to highlight all features > that are within an imaginary cylinder around my object. > > I read about polytope intersector but it seems as though that is for planes > only or can I get cylinder intersector from there as well ? > > Any tips on how I can get started will be much appreciated. > > Thanks! > > Sincerely, > Sanat. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37298#37298 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org