Module Osg.Node_visitor

module Node_visitor: sig .. end
Visitor for type safe operations on Osg.Nodes. Based on GOF's Visitor pattern.

The Osg.Node_visitor is useful for developing type safe operations to nodes in the scene graph (as per Visitor pattern), and adds to this support for optional scene graph traversal to allow operations to be applied to whole scenes at once. The Visitor pattern uses a technique of double dispatch as a mechanism to call the appropriate apply method of the Osg.Node_visitor. To use this feature one must use the Osg.Node.accept which is extended in each Osg.Node subclass, rather than the Osg.Node_visitor apply directly. So use Node.accept root my_visitor instead of Node_visitor.apply apply root. The later method will bypass the double dispatch and the appropriate Node_visitor.apply method will not be called.

type t 
osg::NodeVisitor holder.