Kaiser, Hagen wrote:
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.
When you posted earlier about this (about 3 weeks ago), I remarked that a node's cull callback only seems to be called for objects that are NOT culled, i.e. whose bounding spheres overlap with the frustum. At least, that was my conclusion after a quick test. Step 2 above seems to confirm that this is indeed the case, is it?

Paul

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

Reply via email to