Adrien Mazaud wrote on Thursday, March 19, 2009 11:59 AM: > I have to develop an OSG application with timer trigger. Each object (ie. > Geode) into my scene have to launch a timer when there are displayed (ie. in > front of the camera, visible, showed or whatever you call it). When the timer > is done, object have to trigger a function. My problem is to know when an > object is visible by the camera. Is there any way to do it with OSG? I'm a > old beginner with OSG (ie. a beginner since 6 month now :P) > > Thank you so much for your help
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). HTH, -- Bryan Thrall FlightSafety International bryan.thr...@flightsafety.com _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org