Hi Art,

I've never tried it myself, but the OSG should be able to support
cyclic graphs, just not out of the box.  The way I'd do it is have a
custom Update/Event/CullCallback that is attached to a node in the
cycle, these callbacks count the number of times through in each
traversal, once an max number of cycles in reach the traversal is
stopped - simply be not calling the traverse method.

One of the more tricky parts will be making the callbacks thread safe
- much more of an issue of the cull traversal as update and event
traversals are strictly single threaded so one can store state local
to the callback itself.  For a thread safe cull traversal I guess you
might be able to use the NodePath that the NodeVisitor accumulates as
it traverses as a measure of how many times the cycle has been
completed.

I'd guess you should be able to write such a callback with just a few
lines of code.  Perhaps this would be a nice little exercise for the
community ;-)

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to