I have a code that handles a Cull Callback by overriding traverse method:
void SomeNode::traverse(osg::NodeVisitor& nv)
{
if (nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR)
{
//adjust child node positions depending on the projection
}
}
but looks like there is an alternate way how to add a Cull Callback with
void Node::setCullCallback(Callback* nc);
Which one is better and in what situation? And is the first way is correct?