Moved Registry::ReadFileCallback + WriteFileCallback, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile. Introduced support for assigning ReaderWriter::Options directory to PagedLOD. Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
This commit is contained in:
@@ -274,19 +274,19 @@ class OSG_EXPORT NodeVisitor : public virtual Referenced
|
||||
class DatabaseRequestHandler : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DatabaseRequestHandler():
|
||||
Referenced(true) {}
|
||||
|
||||
virtual void requestNodeFile(const std::string& fileName,osg::Group* group, float priority, const FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& databaseRequest) = 0;
|
||||
|
||||
|
||||
virtual void requestNodeFile(const std::string& fileName,osg::Group* group, float priority, const FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& databaseRequest, const osg::Referenced* options=0) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~DatabaseRequestHandler() {}
|
||||
};
|
||||
|
||||
|
||||
/** Set the handler for database requests.*/
|
||||
void setDatabaseRequestHandler(DatabaseRequestHandler* handler) { _databaseRequestHandler = handler; }
|
||||
|
||||
|
||||
/** Get the handler for database requests.*/
|
||||
DatabaseRequestHandler* getDatabaseRequestHandler() { return _databaseRequestHandler.get(); }
|
||||
|
||||
|
||||
@@ -42,7 +42,16 @@ class OSG_EXPORT PagedLOD : public LOD
|
||||
virtual bool addChild(Node *child, float min, float max,const std::string& filename, float priorityOffset=0.0f, float priorityScale=1.0f);
|
||||
|
||||
virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove=1);
|
||||
|
||||
|
||||
|
||||
/** Set the optional database osgDB::Options object to use when loaded children.*/
|
||||
void setDatabaseOptions(osg::Referenced* options) { _databaseOptions = options; }
|
||||
|
||||
/** Get the optional database osgDB::Options object used when loaded children.*/
|
||||
osg::Referenced* getDatabaseOptions() { return _databaseOptions.get(); }
|
||||
|
||||
/** Get the optional database osgDB::Options object used when loaded children.*/
|
||||
const osg::Referenced* getDatabaseOptions() const { return _databaseOptions.get(); }
|
||||
|
||||
|
||||
/** Set the database path to prepend to children's filenames.*/
|
||||
@@ -133,6 +142,7 @@ class OSG_EXPORT PagedLOD : public LOD
|
||||
|
||||
void expandPerRangeDataTo(unsigned int pos);
|
||||
|
||||
ref_ptr<Referenced> _databaseOptions;
|
||||
std::string _databasePath;
|
||||
|
||||
int _frameNumberOfLastTraversal;
|
||||
|
||||
Reference in New Issue
Block a user