Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback.
Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations
Single features are implemented as bits asother enums in ReaderWriter class already does, so that combinations are possible and fast comparison operations are possible
By default all features are enabled.
I have added this virtual method to the dot plugin to get an idea how to use these features.
With this patch osgconv --formats shows an additional line 'features' for each plugin"
multi-threaded paging, where the Pager manages threads of reading local
and http files via seperate threads. This makes it possible to smoothly
browse large databases where parts of the data are locally cached while
others are on a remote server. Previously with this type of dataset
the pager would stall all paging while http requests were being served,
even when parts of the models are still loadable virtue of being in the
local cache.
Also as part of the refactoring the DatabaseRequest are now stored in the
ProxyNode/PagedLOD nodes to facilitate quite updating in the cull traversal,
with the new code avoiding mutex locks and searches. Previous on big
databases the overhead involved in make database requests could accumulate
to a point where it'd cause the cull traversal to break frame. The overhead
now is negligable.
Finally OSG_FILE_CACHE support has been moved from the curl plugin into
the DatabasePager. Eventually this functionality will be moved out into
osgDB for more general usage.
ReaderWriter::ReadResult now has a FILE_REQUEST enum.
ReaderWriter::Options now has a s/getAsynchronousFileReadHint() parameter methods.
libcurl based plugin now detects enabing of the AsynchronousFileReadHint, but
as yet does not handle async requests - handling everything syncronously.
DatabasePager now by default will enable AsynchronousFileReadHint for http
based file requests
from: DEEP_COPY_STATESETS = 8,
to: DEEP_COPY_STATESETS = 1<<3,
showing clearly that this isn't the _value_ 8, but the _bit_ 8. this is an old pattern i see (and like to promulgate) to make code a bit more readable and maintainable.
"
I've done some additional small modification regarding constness in ReaderWriter and added
mutable on _pluginData so passing data back would be possible too.
Have updated the collada plugin (ReaderWriterDAE.cpp) to use the map to handle options and
have attached the changes.
The stuff in daeReader.h and daeWriter.h are just cosmetic changes to get rid of a warning."
copy constructors that take a const osg::CopyOp rather than a
osg::CopyOp&, forcing an unnecessary copy. The attached header fixes
this, based off OSG 1.2.
Also fixed duplicate "or" openArchive()'s comment."
osg::PagedLOD::s/getDatabasePath() and support in PagedLOD::traverse().
osgDB::ReaderWriter::Options::s/getDatabasePath()
osgDB::Input::s/getOptions()
setting of osgDB::Input::setOptions() in ReaderWriterOSG.cpp
src/osgPlugins/ive/DataInputStream::s/getOptions()
setting of src/osgPlugins/ive/DataInputStream::setOptions() in ReaderWriterIVE.cpp
instead of osgDB::Registry where it original lay. This has been done to allow
fileName strings to be encode data rather than just file names, such as one
requires when using PagedLOD along with plugins for doing dynamic tesselation.