[osg-users] Pruning content
Trajce Nikolov NICK
trajce.nikolov.nick at gmail.com
Mon Dec 14 07:33:33 PST 2015
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:
virtual osgDB::ReaderWriter::ReadResult readNode(const std::string&
filename, const osgDB::Options* options)
{
...
result = osgDB::Registry::instance()->readNodeImplementation(filename,
options);
On Mon, Dec 14, 2015 at 4:00 PM, Jeremy <jswigart at gmail.com> wrote:
> 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
>
> On Mon, Dec 14, 2015, 8:33 AM Trajce Nikolov NICK <
> trajce.nikolov.nick at gmail.com> wrote:
>
>> 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
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> _______________________________________________
> 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/67befcc8/attachment-0003.htm>
More information about the osg-users
mailing list