As a nice OpenSource User I wanted to share my solution for a disussion
I started 2 weeks ago.
My problem was that I wanted to ask OSG to give me all visible objects
in actual the view frustrum, furthermore only relevant groupodes.
My solution surely is not very elegant. And Im sure there are better
ones. So if you know something Id I appreciate feedback.
1. I derived the groupnode to have a groupnode with a visible flag.
2. I installed a CullCallback on those groupnodes, who sets this flag to
true if culling is true for that node.
3. to question the result I wrote a visitor to set all visble flags
to false.
then I call viewer->frame()
then I call a visitor to get me all visible nodes on the special
groupnodes.
Still I think it should be possible to achive the same with a derived
CullVisitor.(if someone knows sth). Because I don't want to do it by
frame but only once in a while.
So a callbackless solution would be best.
But as cant figure out how to use the cull visitor im dependent in using
the preinstalled cullvisitor of the viewer.
But Im happy, my clumy way works.
Anyway, feedback is welcome.
Greetings
Hagen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org