[osg-users] Setting CullVisitor
pmartz at skew-matrix.com
Tue Nov 10 08:51:37 PST 2009
Jean-Sébastien Guay wrote:
>> I need my own CullVisitor because I've defined my own node type that
>> needs special cull handling.
> You could just override the traverse() method of your node type, that's
> how I normally do it. It keeps changes local to the overridden node
> class instead of propagating changes to other parts of the app.
J-S is right. If you're developing a Node that requires special handling
during the cull traversal, writing a custom CullVisitor is overkill. You
should just override traverse() in your custom node. If you ever submit
your node for inclusion in OSG, you can migrate the cull handling code
into osgUtil::CullVisitor at the time you make the submission. This is
what I did when I developed OcclusionQueryNode.
More information about the osg-users