Hi Valery,

Geode's are meant to be leaf nodes, so are no intended to have
children other than drawables - which is why traverse() isn't
appropriate in this case.

If you do want to customize behaviour then could implement override
the Geode::accept() method, this is called before the
NodeVisitor::apply() as it's the actual accept than does the call to
the NodeVisitor.  You'll still need to set the number of children
containing children to make sure the traversal gets down to your leaf
node.

Robert.

On Mon, May 19, 2008 at 11:27 AM, Валерий Быков <[EMAIL PROTECTED]> wrote:
> Thanks a lot for explanation to you and Артём, but my class is derived from
> Geode, therefore osgUtil::UpdateVisitor::apply(Geode&) calls
> handle_geode_callbacks(osg::Geode& geode), which doesn't call traverse
> anyway:
> // should we traverse just in case a subclass of Geode adds children?? Won't
> for now as
> // Geode's aren't designed to have children.
> // traverse(geode);
>
> As I see Geode hasn't chance to update itself without callback?
>
> P.S. Of cource, simple class can resolve this problem:
> class CallTraverseCallback : public osg::NodeCallback
> {
> public:
> void operator() (Node* node, NodeVisitor* nv)
> {
> node->traverse(*nv);
> }
> };
> But is there way without callbacks?
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to