Eric Pouliquen wrote:
OK, good optimization :)
So Maybe using the "apply" function is only a good point when defining custom
visitors, no ?
Due to the updateVisitor behavior, seems that it's better using NodeCallbacks
on predefined visitors... is it correct ?
In the case of the UpdateVisitor, it's sole purpose is to call
callbacks. There is no way to interact with it other than to add a callback.
Where do you think I can find info about visitors application order in OSG ?
I'm looking from the OcclusionQueryNode.cpp coming from you, and just to understand OSG design,
could it possible to create an "apply" function in your node instead of create an
"accept" one in the CullVisitor.cpp ? Just to know if when I create my own nodes, I must
modify the cullvisitor.cpp because is not a good point for me.
Your question is a little confusing. Referring to OcclusionQueryNode
itself, it already has an apply() method (which it gets from META_Node).
And the CullVisitor also has an apply(OcclusionQueryNode&), which is
where the cull visitor determines whether or not to traverse the
OcclusionQueryNode children.
When I was developing the OQN and it was not yet part of OSG, I was
unable to modify the CullVisitor to do this work (of course), so I was
doing the same work current in CullVisitor::apply(OcclusionQueryNode&)
inside of OcclusionQueryNode::traverse() instead. Once integrated into
core OSG, I deleted the OcclusionQueryNode::traverse() function and
moved its code into the CullVisitor.
I'm not sure what, exactly, you're trying to do, so I'm not sure how to
advise you. But I hope this info is helpful to you.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org