Hi Carsten,

 > Oh, now I get it, big misunderstanding on my end. I thought you wanted
 > a traversal that only calls the leave callbacks instead of enter and
 > leave callbacks, sorry.

No prob, could have been more explicit :)

 > You can override an Action's callbacks on a per instance basis
 > (registerEnterFunction, registerLeaveFunction), so you can create a
 > regular RenderAction and register a different callback for geometry.
 > That callback would basically do the same as the regular one, but only
 > after testing that the node has no children.

OK, and here's the problem:

Action::ResultE myTraverse(CNodePtr &  Cnode, Action *action)
{
     OSG::NodePtr node = action->getActNode();

     if( node->getNChildren() )
         return Action::Skip;
     else
         return Action::Continue;
}

[...]

  ra->registerEnterFunction(OSG::Geometry::getClassType(),
     osgTypedFunctionFunctor2CPtrRef< Action::ResultE,
                                      CNodePtr,
                                      Action * >(&myTraverse));

That can't work. If I skip a node with children, the children
won't get traversed. (Consider the case where a Geometry Node
has a Geometry child...)

I don't see how I can just render a leave without "rendering"
the parent just with the enter/leave methods?

Cheers,

   Toni




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to