From Mike Connell, "Give ReadFileCallback access to parent location : These small changes to the database pager allow user code in the ReadFileCallback to safely determine where the file being loaded is destined to be inserted into the scenegraph.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14899 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-06-08 11:18:24 +00:00
parent ceabbdb8d9
commit 4073910ce8
3 changed files with 9 additions and 1 deletions

View File

@@ -769,6 +769,7 @@ void DatabasePager::DatabaseThread::run()
OpenThreads::ScopedLock<OpenThreads::Mutex> drLock(_pager->_dr_mutex);
dr_loadOptions = databaseRequest->_loadOptions.valid() ? databaseRequest->_loadOptions->cloneOptions() : new osgDB::Options;
dr_loadOptions->setTerrain(databaseRequest->_terrain);
dr_loadOptions->setParentGroup(databaseRequest->_group);
fileName = databaseRequest->_fileName;
frameNumberLastRequest = databaseRequest->_frameNumberLastRequest;
}

View File

@@ -31,7 +31,8 @@ Options::Options(const Options& options,const osg::CopyOp& copyop):
_writeFileCallback(options._writeFileCallback),
_fileLocationCallback(options._fileLocationCallback),
_fileCache(options._fileCache),
_terrain(options._terrain) {}
_terrain(options._terrain),
_parentGroup(options._parentGroup) {}
void Options::parsePluginStringData(const std::string& str, char separator1, char separator2)
{