Intersection

OSG has its own intersection strategy that makes use of the node visitor mechanism to reduce time consumption. It is always more efficient than OpenGL's selection feature. The osgUtil::IntersectionVisitor class is the implementer. It is derived from the osg::NodeVisitor class and can test nodes' bounding volumes against the input intersector and quickly skip sub-scene graphs that are not intersectable during the traversal.

The osgUtil::IntersectionVisitor object takes an osgUtil::Intersector derived object as the argument of its constructor. It can be configured for intersection tests with several intersectors, including line segments, planes, and polytopes. An intersector can work in four kinds of coordinate system, each of which ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.