[osg-users] How to know when a geode is visible by the camera?

Adrien Mazaud Adrien.Mazaud at CiTu.fr
Thu Mar 26 03:50:03 PDT 2009


Thrall, Bryan wrote:
> You could attach a DrawCallback to the Geode's Drawables, which would be
> called each time that Drawable is rendered. Make sure your callback
> makes the call on the Drawable to actually render it, though!
> 
> Alternatively, you could add a CullCallback to the Geode, and launch the
> timer when the Geode is not culled (you'd want to use the same culling
> logic that would normally happen; see osgUtil::CullVisitor).


OK I tried both of your solution and finally choose one. I chose the CullCallback because you can use it directly on a Node object while the DrawCallback is implented into the Drawable objects and in my case I have many Drawable into one Geode, moreover I created my own node type for this project that contains two distinct Geodes but one cannot be manipulated.

Thank you so much for your help. OSG is a very powerful tool but hard to learn with its hundreds of classes and more subclasses ;)

See Ya


Adrien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9274#9274








More information about the osg-users mailing list