[osg-users] Pruning content

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Mon Dec 14 06:32:56 PST 2015


Hi Jeremy,

>How would you do this with respect to the pager? I don't see a mechanism
to inject a custom visitor to the pager to modify loaded content, ideally
before caching to the file cache.

Actually there is a way. You can use database read callback and have your
visitor do stuff with the model when a tile/file is read in (paged in).
Have a look at:

osgDB::Registry::instance()->setReadFileCallback
osgDB::Registry::ReadFileCallback

Nick

On Mon, Dec 14, 2015 at 3:03 PM, Jeremy <jswigart at gmail.com> wrote:

> What's the preferred method of loading a model, for example an open flight
> model, and pruning it of unneeded data? I assume that would be by making a
> custom visitor that modifies the hierarchy. Is that correct?
>
> How would you do this with respect to the pager? I don't see a mechanism
> to inject a custom visitor to the pager to modify loaded content, ideally
> before caching to the file cache. I'm inclined to add a custom visitor
> pointer to the options class like a "postLoad" to post process the models
> in a way that is compatible with the pager and file caching. Does that seem
> reasonable? Did I miss any alternative methods?
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151214/088f681c/attachment-0003.htm>


More information about the osg-users mailing list