Re: [osg-users] lazy readNodeFile
I gave a look at PagedLOD and ProxyNode classes and the second one seems what I need. But unfortunately I don't understand the logic behind the loading. Moreover even if I set LoadingExternalReferenceMode the to LOAD_IMMEDIATELY the file is not really loaded "immediately". Which are the events that cause the file loading? Is here a way to force the loading? Basically my scenario is as follows. A piece of code should be able to create instances of my class setting also the external file for the real graphic but I don't want the graphic to be loaded at this point. In fact the code should only generate an object herarchy to be stored in an xml file. Another piece of code that reads the xml is able visualize the graphic, and so load it first. Maybe playing with the UpdateCallback would be more appropriate in this case? Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39085#39085 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] lazy readNodeFile
Hi, maybe also ProxyNode is what you need.. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39077#39077 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] lazy readNodeFile
Thanks Vincent for the fast reply. I give a look at what you suggested. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39076#39076 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] lazy readNodeFile
Hi, Maybe the ReadNodeFileCallback can help you. It is used by the DatabasePager, so you can manage what is done for each readNodeFile call. Or maybe making your own node node as PagedLOD which load the file only when requested... Or playing with UpdateCallback... Sorry this is not a real answer but maybe it can help you. Regards, Vincent. Le 06/05/2011 09:45, Gianni Ambrosio a écrit : Hi All, I implemented a class that embeds an osg::Group. The real graphics for my object is loaded from a file with a readNodeFile() call and the resulting node is set as child of the osg:Group. Now I would like the readNodeFile() is called just when it is needed, that means when the viewer shows the object. Is there something ready in the osg libs to do so? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39073#39073 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] lazy readNodeFile
Hi All, I implemented a class that embeds an osg::Group. The real graphics for my object is loaded from a file with a readNodeFile() call and the resulting node is set as child of the osg:Group. Now I would like the readNodeFile() is called just when it is needed, that means when the viewer shows the object. Is there something ready in the osg libs to do so? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39073#39073 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org