Hi Serge, On 5/13/07, Serge Lages <[EMAIL PROTECTED]> wrote:
Hum finally it's a bit more complicated for me to not be able to retrieve the databasepager. Have you any suggestion on the best way to retrieve, when I am traversing a node, which database pager is called when I do a nv.getDatabaseRequestHandler()->requestNodeFile ?
DatabasePager subclasses from DatabaseRequestHandler, and its the DatabasePager itself that is attached the visitor so you can do: osgDB::DatabasePager* pager = dynamic_cast<osgDB::DatabasePager*>( nv.getDatabaseRequestHandler()); This will work with osgProducer or osgViewer based apps.
The problem with the getScene method is if I use a SimpleViewer there is no scene. That's why I would like to have a method to retrieve the database pager used by my graph independant of the viewer used. Maybe the osgDB::Registry method could now return a list of database pager associated with an id or a name, and the DatabaseRequestHandler could also store this id to be able to retrieve which databasepager is used.
SimpleViewer probably should use Scene, I haven't touched SimpleViewer much since the I began work on Viewer and CompositeViewer classes, and its these viewers that classes like View and Scene came about for, in the case Scene can be rolled back into SimpleViewer. But this is all a rather moot point as my first answer above is exactly what you are after, it'll work with all viewer types. BTW, I'd recommend using Viewer or CompositeViewer rather than SimpleViewer as they are much more powerful and scalable. SimpleViewer is what it says it is. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
