<div dir="ltr">What I do is I call the defaultReadImplementation and have my Visitor process the file read .. so you do something like this in my callback:<div><br></div><div><div>virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& filename, const osgDB::Options* options)</div><div>    {</div><div><span class="" style="white-space:pre">                </span>...</div><div><span class="" style="white-space:pre">                </span>result = osgDB::Registry::instance()->readNodeImplementation(filename, options);</div><div><span class="" style="white-space:pre">        </span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 14, 2015 at 4:00 PM, Jeremy <span dir="ltr"><<a href="mailto:jswigart@gmail.com" target="_blank">jswigart@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Excellent thanks. Looks like that's called in place of the default read implementations how would one invoke the default read functions and then do my filtering afterwards </p><div class="HOEnZb"><div class="h5">
<br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015, 8:33 AM Trajce Nikolov NICK <<a href="mailto:trajce.nikolov.nick@gmail.com" target="_blank">trajce.nikolov.nick@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jeremy,</div><div dir="ltr"><div><br></div><div>><span style="font-size:12.8px">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.</span></div><div><span style="font-size:12.8px"><br></span></div></div><div dir="ltr"><div><span style="font-size:12.8px">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:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">osgDB::Registry::instance()->setReadFileCallback</span><br></div><div><span style="font-size:12.8px">osgDB::Registry::ReadFileCallback</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Nick</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 14, 2015 at 3:03 PM, Jeremy <span dir="ltr"><<a href="mailto:jswigart@gmail.com" target="_blank">jswigart@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">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? </p>
<p dir="ltr">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? </p>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>trajce nikolov nick<br></div>
</div>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">trajce nikolov nick<br></div>
</div>