Cory Riddell wrote:
Unless you've hidden some deeper question within your question, the
answer is to simply do this:
  A->addChild( B );
  B->addChild( D );
  C->addChild( D );

Well, I haven't actually tried it yet, but Gordon says none of the
traversal routines will ever see "C". This makes sense to me. Is it wrong?

But, the question you asked was in your original post was: how to create it and is it possible to create it? I think my code snippet answered that. :-)

Anyhow, I think Gordon over-generalized. You could use a CompositeViewer with multiple views, for example, one rendering the scene graph from root node A and one rendering from root node C. You could also write a NodeVisitor that uses the TRAVERSE_PARENTS traversal mode. So there are many cases where it's meaningful and useful in OSG to have multiple root nodes.

Ultimately, the question I'd direct back to you is: what are you trying to do, and why do you think that multiple root nodes would help?
  -Paul

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to