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

2009-03-26 Thread Adrien Mazaud

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2009-03-24 Thread Adrien Mazaud
Thanks for the tip and sorry to answer you so late. I'll try your solution this 
afternoon and tell you my feedback.

OSG is very powerful but, in my opinion, so huge that it's difficult to know 
every functionality. It also too less documented, but that's only my opinion.

Anyway, thanks for your help ;)

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to know when an geode is visible bye the camera?

2009-03-19 Thread Adrien Mazaud
Hi everybody,

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



Adrien

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org