[osg-users] Setting CullVisitor
Paul Martz
pmartz at skew-matrix.com
Tue Nov 10 09:07:36 PST 2009
Jean-Sébastien Guay wrote:
> I know I risk making the thread diverge into unrelated concerns, but I
> wanted to ask:
No actually, I think this is the right direction for this thread to
take. :-)
> Are there advantages to modifying CullVisitor rather than overriding
> traverse(), other than one dynamic_cast per frame per node? I think if
> that's the only advantage, I'd personally prefer keeping all the code
> related to the node type local to the type itself, even if that node
> type were to be included into OSG.
Not sure. When I looked into this for OcclusionQueryNode, I was just
following the existing coding pattern for core OSG nodes. Most of them
had the bulk of their cull traversal functionality in the
CullVisitor::apply() for that particular node type, and did not override
the traverse() member function.
-Paul
More information about the osg-users
mailing list