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
This commit is contained in:
Robert Osfield
2004-10-06 09:31:34 +00:00
parent debf8dceef
commit 7e4d34c57a
7 changed files with 85 additions and 7 deletions

View File

@@ -43,6 +43,15 @@ class SG_EXPORT PagedLOD : public LOD
virtual bool removeChild(Node *child);
/** Set the database path to prepend to children's filenames.*/
void setDatabasePath(const std::string& path);
/** Get the database path used to prepend to children's filenames.*/
inline const std::string& getDatabasePath() const { return _databasePath; }
struct SG_EXPORT PerRangeData
{
@@ -57,7 +66,7 @@ class SG_EXPORT PagedLOD : public LOD
};
typedef std::vector<PerRangeData> PerRangeDataList;
void setFileName(unsigned int childNo, const std::string& filename) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._filename=filename; }
const std::string& getFileName(unsigned int childNo) const { return _perRangeDataList[childNo]._filename; }
unsigned int getNumFileNames() const { return _perRangeDataList.size(); }
@@ -112,6 +121,8 @@ class SG_EXPORT PagedLOD : public LOD
void expandPerRangeDataTo(unsigned int pos);
std::string _databasePath;
int _frameNumberOfLastTraversal;
unsigned int _numChildrenThatCannotBeExpired;
PerRangeDataList _perRangeDataList;