[osg-users] LineOfSight intersection returning geometry

Robert Osfield robert.osfield at gmail.com
Tue Feb 16 01:40:58 PST 2016


HI Tony,

On 16 February 2016 at 05:00, Tony Vasile <minghia at gmail.com> wrote:
> By the way does OpenSceneGraph have a separate mask for intersection as well as rendering? I have some geometry that I don't want to intersect but do want to be rendered.

The NodeVisitor base class has a setTraversalMask() method for
controlling which mask to && against node mask's with.  This means the
osgUtil::IntersectionVisitor class inherits this setTraversalMask().
The View::computrIntersection(..) convenience methods all take a
traversalMask that they pass on to the IntersectionVisitor.

i.e.
View:        bool computeIntersections(float x,float y,
osgUtil::LineSegmentIntersector::Intersections&
intersections,osg::Node::NodeMask traversalMask = 0xffffffff);

Robert.



More information about the osg-users mailing list